Initial commit

This commit is contained in:
Patrick Alvin Alcala 2025-06-26 16:53:43 +08:00
commit 209ba130c0
4852 changed files with 1517959 additions and 0 deletions

View file

@ -0,0 +1,32 @@
---@type core.doc
local Doc = require "core.doc"
---A readonly core.doc.
---@class lsp.helpdoc : core.doc
local HelpDoc = Doc:extend()
---Set the help text.
---@param text string
function HelpDoc:set_text(text)
self.lines = {}
local i = 1
for line in text:gmatch("([^\n]*)\n?") do
if line:byte(-1) == 13 then
line = line:sub(1, -2)
self.crlf = true
end
table.insert(self.lines, line .. "\n")
self.highlighter.lines[i] = false
i = i + 1
end
self:reset_syntax()
end
function HelpDoc:raw_insert(...) end
function HelpDoc:raw_remove(...) end
function HelpDoc:load(...) end
function HelpDoc:reload() end
function HelpDoc:save(...) end
return HelpDoc