summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-05 10:46:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-05 10:46:13 +0800
commitacf1fe450e713911c6d0b9f60a0f0b81a2fce143 (patch)
tree5372d4495f886adbab3719784560a1dcb5a19457
parent5b95f9f1ec40ade76e55007e5cde73c0ffa96d26 (diff)
downloadlua-language-server-acf1fe450e713911c6d0b9f60a0f0b81a2fce143.zip
fix #280
-rw-r--r--changelog.md1
-rw-r--r--script/core/signature.lua6
2 files changed, 6 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 0a5a7215..9ab1228c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -5,6 +5,7 @@
* `NEW` fully supports `---@generic T`
* `FIX` [#274](https://github.com/sumneko/lua-language-server/issues/274)
* `FIX` [#279](https://github.com/sumneko/lua-language-server/issues/279)
+* `FIX` [#280](https://github.com/sumneko/lua-language-server/issues/280)
## 1.4.0
`2020-12-3`
diff --git a/script/core/signature.lua b/script/core/signature.lua
index bd823454..2f652f39 100644
--- a/script/core/signature.lua
+++ b/script/core/signature.lua
@@ -80,11 +80,15 @@ local function makeSignatures(call, pos)
end
local signs = {}
local defs = vm.getDefs(node, 0)
+ local mark = {}
for _, src in ipairs(defs) do
src = guide.getObjectValue(src) or src
if src.type == 'function'
or src.type == 'doc.type.function' then
- signs[#signs+1] = makeOneSignature(src, oop, index)
+ if not mark[src] then
+ mark[src] = true
+ signs[#signs+1] = makeOneSignature(src, oop, index)
+ end
end
end
return signs