diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-10 21:11:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-10 21:11:16 +0800 |
commit | 72954de6b303866cbdbab25c0f4e8c00b9dfbe2b (patch) | |
tree | 94154650fb262e9453636445004b2fb3f69e3720 /script/core | |
parent | 5addb4269a201e8a33479dce236adf8a38a37391 (diff) | |
download | lua-language-server-72954de6b303866cbdbab25c0f4e8c00b9dfbe2b.zip |
update
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/semantic-tokens.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index f4050acd..96a1a56c 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -104,6 +104,15 @@ local Care = util.switch() modifieres = define.TokenModifiers.declaration, } end + if source.attrs then + for _, attr in ipairs(source.attrs) do + results[#results+1] = { + start = attr.start, + finish = attr.finish, + type = define.TokenTypes.typeParameter, + } + end + end local loc = source.node or source -- 1. 值为函数的局部变量 | Local variable whose value is a function if loc.refs then @@ -220,11 +229,6 @@ local Care = util.switch() end end end - -- 7. 函数调用 | Function call - if source.parent.type == 'call' - and source.parent.node == source then - return - end local mod if source.type == 'local' then mod = define.TokenModifiers.declaration |