summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/completion.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index f5444e67..eab35ea0 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -338,6 +338,9 @@ local function searchInRequire(vm, select, source, callback)
return
end
local list = vm.lsp.workspace:matchPath(vm.uri, source[1])
+ if not list then
+ return
+ end
for _, str in ipairs(list) do
callback(str, nil, CompletionItemKind.File, {
textEdit = {
@@ -420,6 +423,9 @@ local function searchAllWords(vm, source, word, callback)
if word == '' then
return
end
+ if source.type == 'string' then
+ return
+ end
for _, src in ipairs(vm.sources) do
if src.type == 'name'
and matchKey(word, src[1])