diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-25 19:43:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-25 19:43:01 +0800 |
commit | ce158c82b0de9f7dd700ed4eabea6e9e26f491da (patch) | |
tree | 13ad06ca3320ab3cd2ae89b2ed3d407bed457c75 /script/core/completion.lua | |
parent | 123d904a16f49764f36cabef97c2be0f2acca34c (diff) | |
download | lua-language-server-ce158c82b0de9f7dd700ed4eabea6e9e26f491da.zip |
cleanup
Diffstat (limited to 'script/core/completion.lua')
-rw-r--r-- | script/core/completion.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index 8a9e1f14..d2836101 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -149,7 +149,7 @@ local function getSnip(source) if context <= 0 then return nil end - local defs = vm.getRefs(source, 0) + local defs = vm.getRefs(source) for _, def in ipairs(defs) do def = searcher.getObjectValue(def) or def if def ~= source and def.type == 'function' then @@ -274,7 +274,7 @@ local function checkLocal(ast, word, offset, results) goto CONTINUE end if vm.hasType(source, 'function') then - for _, def in ipairs(vm.getDefs(source, 0)) do + for _, def in ipairs(vm.getDefs(source)) do if def.type == 'function' or def.type == 'doc.type.function' then local funcLabel = name .. getParams(def, false) @@ -1431,7 +1431,7 @@ local function tryCallArg(ast, text, offset, results) if arg and arg.type == 'function' then return end - local defs = vm.getDefs(call.node, 0) + local defs = vm.getDefs(call.node) for _, def in ipairs(defs) do def = searcher.getObjectValue(def) or def local enums = getCallEnums(def, argIndex) |