File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 7070* ` FIX ` [ #1320 ] ( https://github.com/sumneko/lua-language-server/issues/1320 )
7171* ` FIX ` [ #1330 ] ( https://github.com/sumneko/lua-language-server/issues/1330 )
7272* ` FIX ` [ #1346 ] ( https://github.com/sumneko/lua-language-server/issues/1346 )
73+ * ` FIX ` [ #1348 ] ( https://github.com/sumneko/lua-language-server/issues/1348 )
7374
7475## 3.4.2
7576` 2022-7-6 `
Original file line number Diff line number Diff line change @@ -134,19 +134,16 @@ local Care = util.switch()
134134 return
135135 end
136136 local loc = source .node or source
137+ local uri = guide .getUri (loc )
137138 -- 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
150147 end
151148 -- 3. 特殊变量 | Special variableif source[1] == '_ENV' then
152149 if loc [1 ] == ' _ENV' then
You can’t perform that action at this time.
0 commit comments