summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-26 01:42:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-26 01:42:35 +0800
commitfc4e8ef687ad996f96091c664c6a9110dd087a5d (patch)
tree83f6d2e7fcf63e6b45d94a1d8127efd3d0d22f65 /script
parentc78fbf09aa4406db905a8a0e6dd5731871f2c262 (diff)
downloadlua-language-server-fc4e8ef687ad996f96091c664c6a9110dd087a5d.zip
#1207 split `...(param)` and `...(return)`
displayed in enums of hover
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/description.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index c96aaae3..a0508cf9 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -206,6 +206,9 @@ local function getBindEnums(source, docGroup)
for _, doc in ipairs(docGroup) do
if doc.type == 'doc.param' then
local name = doc.param[1]
+ if name == '...' then
+ name = '...(param)'
+ end
if mark[name] then
goto CONTINUE
end
@@ -215,6 +218,9 @@ local function getBindEnums(source, docGroup)
for _, rtn in ipairs(doc.returns) do
returnIndex = returnIndex + 1
local name = rtn.name and rtn.name[1] or ('return #%d'):format(returnIndex)
+ if name == '...' then
+ name = '...(return)'
+ end
if mark[name] then
goto CONTINUE
end