diff options
author | Andreas <andreas.matthias@gmail.com> | 2024-02-26 14:35:19 +0100 |
---|---|---|
committer | Andreas <andreas.matthias@gmail.com> | 2024-02-26 14:35:19 +0100 |
commit | d0bfdaa6aa1f75b45f4eeeaabb7de1e0a99075bf (patch) | |
tree | 462be31229557c7ef1a86e44800d1dbe0e954e5c /script/cli | |
parent | beacc217d1858a917df326c7a2535bed8a33d283 (diff) | |
download | lua-language-server-d0bfdaa6aa1f75b45f4eeeaabb7de1e0a99075bf.zip |
Add "deprecated" key in JSON output.
Diffstat (limited to 'script/cli')
-rw-r--r-- | script/cli/doc.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/cli/doc.lua b/script/cli/doc.lua index 7f7d38e3..7e7c8534 100644 --- a/script/cli/doc.lua +++ b/script/cli/doc.lua @@ -192,6 +192,10 @@ local function collectTypes(global, results) 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 + end return end if source.type == 'tableindex' then @@ -256,6 +260,10 @@ local function collectVars(global, results) 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 + end end end if #result.defines == 0 then |