diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 10:46:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-05 10:46:13 +0800 |
commit | acf1fe450e713911c6d0b9f60a0f0b81a2fce143 (patch) | |
tree | 5372d4495f886adbab3719784560a1dcb5a19457 | |
parent | 5b95f9f1ec40ade76e55007e5cde73c0ffa96d26 (diff) | |
download | lua-language-server-acf1fe450e713911c6d0b9f60a0f0b81a2fce143.zip |
fix #280
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/core/signature.lua | 6 |
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 |