summaryrefslogtreecommitdiff
path: root/script/cli/doc.lua
diff options
context:
space:
mode:
authorNyakoFox <nyakowofox@gmail.com>2023-11-25 16:29:54 -0400
committerNyakoFox <nyakowofox@gmail.com>2023-11-25 16:43:37 -0400
commit5a468a1a41535ff408490595ec694c65f337c6ba (patch)
treedf2fcc6c6e973d13ef51273f2cdc9b372abc4101 /script/cli/doc.lua
parent8c4aca0fb664b7f7e383441e318b000e6cf971de (diff)
downloadlua-language-server-5a468a1a41535ff408490595ec694c65f337c6ba.zip
Add raw descriptions
Diffstat (limited to 'script/cli/doc.lua')
-rw-r--r--script/cli/doc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/cli/doc.lua b/script/cli/doc.lua
index c643deea..9140a258 100644
--- a/script/cli/doc.lua
+++ b/script/cli/doc.lua
@@ -65,6 +65,7 @@ local function packObject(source, mark)
end
if source.type == 'function.return' then
new['desc'] = source.comment and getDesc(source.comment)
+ new['rawdesc'] = source.comment and getDesc(source.comment, true)
end
if source.type == 'doc.type.table' then
new['fields'] = packObject(source.fields, mark)
@@ -82,6 +83,7 @@ local function packObject(source, mark)
end
if source.bindDocs then
new['desc'] = getDesc(source)
+ new['rawdesc'] = getDesc(source, true)
end
new['view'] = new['view'] or vm.getInfer(source):view(ws.rootUri)
end
@@ -115,6 +117,7 @@ local function collectTypes(global, results)
name = global.name,
type = 'type',
desc = nil,
+ rawdesc = nil,
defines = {},
fields = {},
}
@@ -131,6 +134,7 @@ local function collectTypes(global, results)
extends = getExtends(set),
}
result.desc = result.desc or getDesc(set)
+ result.rawdesc = result.rawdesc or getDesc(set, true)
::CONTINUE::
end
if #result.defines == 0 then
@@ -163,6 +167,7 @@ local function collectTypes(global, results)
field.start = source.start
field.finish = source.finish
field.desc = getDesc(source)
+ field.rawdesc = getDesc(source, true)
field.extends = packObject(source.extends)
return
end
@@ -180,6 +185,7 @@ local function collectTypes(global, results)
field.start = source.start
field.finish = source.finish
field.desc = getDesc(source)
+ field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
return
end
@@ -199,6 +205,7 @@ local function collectTypes(global, results)
field.start = source.start
field.finish = source.finish
field.desc = getDesc(source)
+ field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
return
end
@@ -237,6 +244,7 @@ local function collectVars(global, results)
extends = packObject(set.value),
}
result.desc = result.desc or getDesc(set)
+ result.rawdesc = result.rawdesc or getDesc(set, true)
end
end
if #result.defines == 0 then