summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-01-23 03:33:41 +0800
committersumneko <sumneko@hotmail.com>2022-01-23 03:33:41 +0800
commite5ef01c23e250a869e2e023ba83de1f5a28feb97 (patch)
treec8545f13b7ea918848353cc94e842bf0e61229ae /script/core
parentce3a22bacd3acd2984c14246feee9bd90283279a (diff)
downloadlua-language-server-e5ef01c23e250a869e2e023ba83de1f5a28feb97.zip
get scoped files
Diffstat (limited to 'script/core')
-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 b65ee0d8..16cecd04 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -328,7 +328,7 @@ local function checkModule(state, word, position, results)
return
end
local locals = guide.getVisibleLocals(state.ast, position)
- for uri in files.eachFile() do
+ for uri in files.eachFile(state.uri) do
if uri == guide.getUri(state.ast) then
goto CONTINUE
end
@@ -647,7 +647,7 @@ local function checkCommon(state, word, position, results)
end
if config.get(state.uri, 'Lua.completion.workspaceWord') and #word >= 2 then
local myHead = word:sub(1, 2)
- for uri in files.eachFile() do
+ for uri in files.eachFile(state.uri) do
if #results >= 100 then
results.incomplete = true
break
@@ -880,7 +880,7 @@ end
local function collectRequireNames(mode, myUri, literal, source, smark, position, results)
local collect = {}
if mode == 'require' then
- for uri in files.eachFile() do
+ for uri in files.eachFile(myUri) do
if myUri == uri then
goto CONTINUE
end
@@ -934,7 +934,7 @@ local function collectRequireNames(mode, myUri, literal, source, smark, position
end
end
else
- for uri in files.eachFile() do
+ for uri in files.eachFile(myUri) do
if myUri == uri then
goto CONTINUE
end