summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-07 16:20:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-07 16:20:35 +0800
commitd0f2fff90e56a6e2b1448217174e29fb0d17d05a (patch)
tree41ac0f2928e3b599f9e2122f8796ed8c325a2e6d /script/core
parent6c0fc0d438154f2164e10674f5c1a4b983382039 (diff)
downloadlua-language-server-d0f2fff90e56a6e2b1448217174e29fb0d17d05a.zip
resolve #478 new setting: `completion.showParams`
Diffstat (limited to 'script/core')
-rw-r--r--script/core/completion.lua8
-rw-r--r--script/core/guide.lua2
2 files changed, 10 insertions, 0 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index 624ea0a6..03d17a22 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -505,6 +505,14 @@ local function checkFieldOfRefs(refs, ast, word, start, offset, parent, oop, res
fields[funcLabel] = src
fields[name] = false
count = count + 1
+ if value.type == 'function' and value.bindDocs then
+ for _, doc in ipairs(value.bindDocs) do
+ if doc.type == 'doc.overload' then
+ funcLabel = name .. getParams(doc.overload, oop)
+ fields[funcLabel] = doc.overload
+ end
+ end
+ end
goto CONTINUE
end
end
diff --git a/script/core/guide.lua b/script/core/guide.lua
index 367b91e2..e4871060 100644
--- a/script/core/guide.lua
+++ b/script/core/guide.lua
@@ -1842,6 +1842,8 @@ function m.checkSameSimpleByBindDocs(status, obj, start, pushQueue, mode)
if obj.type == '...' then
results[#results+1] = doc
end
+ elseif doc.type == 'doc.overload' then
+ results[#results+1] = doc.overload
end
end
for _, res in ipairs(results) do