summaryrefslogtreecommitdiff
path: root/script/cli/doc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-02-26 20:22:50 +0800
committerGitHub <noreply@github.com>2024-02-26 20:22:50 +0800
commite1afc6ef5313e3ff0a02b128e5139dfb5b9efaab (patch)
tree462be31229557c7ef1a86e44800d1dbe0e954e5c /script/cli/doc.lua
parenta9629f9f8c615d189bcc389e912c0aefa4e65776 (diff)
parent6b8b102dc37b48f71c4bea362b78a50b443dae7d (diff)
downloadlua-language-server-e1afc6ef5313e3ff0a02b128e5139dfb5b9efaab.zip
Merge pull request #2539 from AndreasMatthias/async
Add "async" key in JSON output.
Diffstat (limited to 'script/cli/doc.lua')
-rw-r--r--script/cli/doc.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/cli/doc.lua b/script/cli/doc.lua
index 7b1cdca2..7e7c8534 100644
--- a/script/cli/doc.lua
+++ b/script/cli/doc.lua
@@ -189,9 +189,12 @@ local function collectTypes(global, results)
field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
field.visible = vm.getVisibleType(source)
+ if vm.isAsync(source, true) then
+ field.async = true
+ end
local depr = vm.getDeprecated(source)
if (depr and not depr.versions) then
- field.deprecated = true
+ field.deprecated = true
end
return
end
@@ -254,9 +257,12 @@ local function collectVars(global, results)
result.rawdesc = result.rawdesc or getDesc(set, true)
result.defines[#result.defines].extends['desc'] = getDesc(set)
result.defines[#result.defines].extends['rawdesc'] = getDesc(set, true)
+ if vm.isAsync(set, true) then
+ result.defines[#result.defines].extends['async'] = true
+ end
local depr = vm.getDeprecated(set)
if (depr and not depr.versions) then
- result.defines[#result.defines].extends['deprecated'] = true
+ result.defines[#result.defines].extends['deprecated'] = true
end
end
end