summaryrefslogtreecommitdiff
path: root/script/core/completion/completion.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r--script/core/completion/completion.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 39f95ddf..a8909d06 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -315,7 +315,7 @@ local function checkLocal(state, word, position, results)
return orders[a] < orders[b]
end)
for _, def in ipairs(defs) do
- if def.type == 'function'
+ if (def.type == 'function' and not vm.isVarargFunctionWithOverloads(def))
or def.type == 'doc.type.function' then
local funcLabel = name .. getParams(def, false)
buildFunction(results, source, def, false, {
@@ -490,7 +490,7 @@ end
local function checkFieldThen(state, name, src, word, startPos, position, parent, oop, results)
local value = vm.getObjectFunctionValue(src) or src
local kind = define.CompletionItemKind.Field
- if value.type == 'function'
+ if (value.type == 'function' and not vm.isVarargFunctionWithOverloads(value))
or value.type == 'doc.type.function' then
if oop then
kind = define.CompletionItemKind.Method
@@ -572,9 +572,11 @@ local function checkFieldOfRefs(refs, state, word, startPos, position, parent, o
local value = vm.getObjectFunctionValue(src) or src
if value.type == 'function'
or value.type == 'doc.type.function' then
- funcLabel = name .. getParams(value, oop)
- fields[funcLabel] = src
- count = count + 1
+ if not vm.isVarargFunctionWithOverloads(value) then
+ funcLabel = name .. getParams(value, oop)
+ fields[funcLabel] = src
+ count = count + 1
+ end
if value.type == 'function' and value.bindDocs then
for _, doc in ipairs(value.bindDocs) do
if doc.type == 'doc.overload' then