Skip to content

Commit 3853d4d

Browse files
committed
fix #1278
1 parent 579909c commit 3853d4d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# changelog
22

3+
## 3.5.0
4+
* `FIX` [#1278](https://github.com/sumneko/lua-language-server/issues/1278)
5+
36
## 3.4.1
47
`2022-7-5`
58
* `NEW` settings:

script/workspace/require-path.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ function m.findUrisByRequirePath(suri, path)
111111
tracy.ZoneBeginN('findUrisByRequirePath')
112112
local results = {}
113113
local searchers = {}
114-
for uri in files.eachDll() do
115-
local opens = files.getDllOpens(uri) or {}
116-
for _, open in ipairs(opens) do
117-
if open == fspath then
118-
results[#results+1] = uri
119-
end
120-
end
121-
end
122114

123115
---@type collector
124116
local clt = scope.getScope(suri):get('requireName')
@@ -137,6 +129,15 @@ function m.findUrisByRequirePath(suri, path)
137129
end
138130
end
139131

132+
for uri in files.eachDll() do
133+
local opens = files.getDllOpens(uri) or {}
134+
for _, open in ipairs(opens) do
135+
if open == fspath then
136+
results[#results+1] = uri
137+
end
138+
end
139+
end
140+
140141
tracy.ZoneEnd()
141142
return results, searchers
142143
end

0 commit comments

Comments
 (0)