diff options
author | Andreas <andreas.matthias@gmail.com> | 2024-02-20 18:43:36 +0100 |
---|---|---|
committer | Andreas <andreas.matthias@gmail.com> | 2024-02-20 18:43:36 +0100 |
commit | e9e8f67a25ef4f76e0b66acc69fc210b2ce3573a (patch) | |
tree | 74df1b2fcff1e30f845c39d7b746dc680bf92fa4 | |
parent | 25cb0bdd2a27a5e3ebdd5a7ebc999add296c7c28 (diff) | |
download | lua-language-server-e9e8f67a25ef4f76e0b66acc69fc210b2ce3573a.zip |
Added "async" key in JSON output.
-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..56738123 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 |