diff options
author | Andreas <andreas.matthias@gmail.com> | 2024-02-26 14:31:52 +0100 |
---|---|---|
committer | Andreas <andreas.matthias@gmail.com> | 2024-02-26 14:31:52 +0100 |
commit | beacc217d1858a917df326c7a2535bed8a33d283 (patch) | |
tree | 8ed612822bfdf0c1d3c4fb33deebda94f8f360f1 /script | |
parent | 37233462b95b9a104bf30adf50cfa1c4416cc264 (diff) | |
download | lua-language-server-beacc217d1858a917df326c7a2535bed8a33d283.zip |
Add "async" key in JSON output.
Diffstat (limited to 'script')
-rw-r--r-- | script/cli/doc.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/cli/doc.lua b/script/cli/doc.lua index fb9b0a8e..7f7d38e3 100644 --- a/script/cli/doc.lua +++ b/script/cli/doc.lua @@ -189,6 +189,9 @@ 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 return end if source.type == 'tableindex' then @@ -250,6 +253,9 @@ 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 end end if #result.defines == 0 then |