File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 70
70
* ` FIX ` [ #1320 ] ( https://github.com./sumneko/lua-language-server/issues/1320 )
71
71
* ` FIX ` [ #1330 ] ( https://github.com./sumneko/lua-language-server/issues/1330 )
72
72
* ` FIX ` [ #1346 ] ( https://github.com./sumneko/lua-language-server/issues/1346 )
73
+ * ` FIX ` [ #1348 ] ( https://github.com./sumneko/lua-language-server/issues/1348 )
73
74
74
75
## 3.4.2
75
76
` 2022-7-6 `
Original file line number Diff line number Diff line change @@ -134,19 +134,16 @@ local Care = util.switch()
134
134
return
135
135
end
136
136
local loc = source .node or source
137
+ local uri = guide .getUri (loc )
137
138
-- 1. 值为函数的局部变量 | Local variable whose value is a function
138
- if loc .ref then
139
- for _ , ref in ipairs (loc .ref ) do
140
- if ref .value and ref .value .type == ' function' then
141
- results [# results + 1 ] = {
142
- start = source .start ,
143
- finish = source .finish ,
144
- type = define .TokenTypes [' function' ],
145
- modifieres = define .TokenModifiers .declaration ,
146
- }
147
- return
148
- end
149
- end
139
+ if vm .getInfer (source ):hasFunction (uri ) then
140
+ results [# results + 1 ] = {
141
+ start = source .start ,
142
+ finish = source .finish ,
143
+ type = define .TokenTypes [' function' ],
144
+ modifieres = define .TokenModifiers .declaration ,
145
+ }
146
+ return
150
147
end
151
148
-- 3. 特殊变量 | Special variableif source[1] == '_ENV' then
152
149
if loc [1 ] == ' _ENV' then
You can’t perform that action at this time.
0 commit comments