summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-05 17:48:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-05 17:48:09 +0800
commit3853d4d8a9a2478c3afa4126a97bcbc65208a8cc (patch)
tree657838b40920681184fdd15db75bab0462c79450 /script
parent579909cc99018e69a865d9b682ad6e867ab002dc (diff)
downloadlua-language-server-3853d4d8a9a2478c3afa4126a97bcbc65208a8cc.zip
fix #1278
Diffstat (limited to 'script')
-rw-r--r--script/workspace/require-path.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua
index fbe559ad..24a0b025 100644
--- a/script/workspace/require-path.lua
+++ b/script/workspace/require-path.lua
@@ -111,14 +111,6 @@ function m.findUrisByRequirePath(suri, path)
tracy.ZoneBeginN('findUrisByRequirePath')
local results = {}
local searchers = {}
- for uri in files.eachDll() do
- local opens = files.getDllOpens(uri) or {}
- for _, open in ipairs(opens) do
- if open == fspath then
- results[#results+1] = uri
- end
- end
- end
---@type collector
local clt = scope.getScope(suri):get('requireName')
@@ -137,6 +129,15 @@ function m.findUrisByRequirePath(suri, path)
end
end
+ for uri in files.eachDll() do
+ local opens = files.getDllOpens(uri) or {}
+ for _, open in ipairs(opens) do
+ if open == fspath then
+ results[#results+1] = uri
+ end
+ end
+ end
+
tracy.ZoneEnd()
return results, searchers
end