diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/workspace/require-path.lua | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/changelog.md b/changelog.md index de341c3f..27448c47 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 3.5.0 +* `FIX` [#1278](https://github.com/sumneko/lua-language-server/issues/1278) + ## 3.4.1 `2022-7-5` * `NEW` settings: 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 |