summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-02-19 15:24:59 +0800
committerGitHub <noreply@github.com>2024-02-19 15:24:59 +0800
commit6c224b7033f15b2956e0050dc946b948d7ea7fdd (patch)
tree4ff97ff20cd00a97b8fdd2cef66ad8e435cd0e58
parentcd1b68ac79c2eaf48da4f75cee01f860b4a7e905 (diff)
parent3a46e647a83d719cb4dc4d719372d0d63ec87aac (diff)
downloadlua-language-server-6c224b7033f15b2956e0050dc946b948d7ea7fdd.zip
Merge pull request #2525 from AndreasMatthias/visible
Added 'visible' key (public, protected, ...) in JSON output.
-rw-r--r--script/cli/doc.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/cli/doc.lua b/script/cli/doc.lua
index 43ad96d3..2d2ae81b 100644
--- a/script/cli/doc.lua
+++ b/script/cli/doc.lua
@@ -169,6 +169,7 @@ local function collectTypes(global, results)
field.desc = getDesc(source)
field.rawdesc = getDesc(source, true)
field.extends = packObject(source.extends)
+ field.visible = vm.getVisibleType(source)
return
end
if source.type == 'setfield'
@@ -187,6 +188,7 @@ local function collectTypes(global, results)
field.desc = getDesc(source)
field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
+ field.visible = vm.getVisibleType(source)
return
end
if source.type == 'tableindex' then
@@ -207,6 +209,7 @@ local function collectTypes(global, results)
field.desc = getDesc(source)
field.rawdesc = getDesc(source, true)
field.extends = packObject(source.value)
+ field.visible = vm.getVisibleType(source)
return
end
end)