Skip to content

Commit 73b5e9e

Browse files
committed
fix #487
1 parent a0caef2 commit 73b5e9e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Diff for: changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
`FIX` [#479](https://github.com/sumneko/lua-language-server/issues/479)
55
`FIX` [#483](https://github.com/sumneko/lua-language-server/issues/483)
66
`FIX` [#485](https://github.com/sumneko/lua-language-server/issues/485)
7+
`FIX` [#487](https://github.com/sumneko/lua-language-server/issues/487)
78

89
## 1.20.2
910
`2021-4-2`

Diff for: script/core/semantic-tokens.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ Care['getlocal'] = function (source, results)
6868
and source.parent.node == source then
6969
return
7070
end
71-
-- 3. 函数的参数
71+
-- 3. 特殊变量
72+
if source[1] == '_ENV'
73+
or source[1] == 'self' then
74+
return
75+
end
76+
-- 4. 函数的参数
7277
if loc.parent and loc.parent.type == 'funcargs' then
7378
results[#results+1] = {
7479
start = source.start,
@@ -78,11 +83,6 @@ Care['getlocal'] = function (source, results)
7883
}
7984
return
8085
end
81-
-- 4. 特殊变量
82-
if source[1] == '_ENV'
83-
or source[1] == 'self' then
84-
return
85-
end
8686
-- 5. const 变量
8787
if loc.attrs then
8888
for _, attr in ipairs(loc.attrs) do

0 commit comments

Comments
 (0)