summaryrefslogtreecommitdiff
path: root/script/core/completion/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-01 03:35:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-01 03:35:40 +0800
commitb9fdfac7c33478161dc17b8e41a0bd46b6f23621 (patch)
treec9e748de4a93fa892851f8592545aadb20690009 /script/core/completion/completion.lua
parentd8e7c0b4b388c5ca125d17554814be68444ce1aa (diff)
downloadlua-language-server-b9fdfac7c33478161dc17b8e41a0bd46b6f23621.zip
update
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r--script/core/completion/completion.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 6a979af9..76dd6480 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -183,7 +183,7 @@ local function getSnip(source)
end
local defs = vm.getRefs(source)
for _, def in ipairs(defs) do
- def = searcher.getObjectValue(def) or def
+ def = vm.getObjectValue(def) or def
if def ~= source and def.type == 'function' then
local uri = guide.getUri(def)
local text = files.getText(uri)
@@ -458,7 +458,7 @@ local function checkFieldFromFieldToIndex(state, name, src, parent, word, startP
end
local function checkFieldThen(state, name, src, word, startPos, position, parent, oop, results)
- local value = searcher.getObjectValue(src) or src
+ local value = vm.getObjectValue(src) or src
local kind = define.CompletionItemKind.Field
if value.type == 'function'
or value.type == 'doc.type.function' then
@@ -537,7 +537,7 @@ local function checkFieldOfRefs(refs, state, word, startPos, position, parent, o
end
local funcLabel
if config.get(state.uri, 'Lua.completion.showParams') then
- local value = searcher.getObjectValue(src) or src
+ local value = vm.getObjectValue(src) or src
if value.type == 'function'
or value.type == 'doc.type.function' then
funcLabel = name .. getParams(value, oop)
@@ -1494,7 +1494,7 @@ local function tryCallArg(state, position, results)
end
local defs = vm.getDefs(call.node)
for _, def in ipairs(defs) do
- def = searcher.getObjectValue(def) or def
+ def = vm.getObjectValue(def) or def
local enums = getCallEnumsAndFuncs(def, argIndex, oop, call)
if enums then
mergeEnums(myResults, enums, arg)