diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-05-18 14:58:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-05-18 14:58:13 +0800 |
commit | da43d801df94ed8dce217499afb83aedb1ed24d5 (patch) | |
tree | 2567f90ae14797213b88a9144f7d05885314305e /script/method | |
parent | 4eb2567da4cb1afd61acc889366119f32d9c4255 (diff) | |
download | lua-language-server-da43d801df94ed8dce217499afb83aedb1ed24d5.zip |
区分一下localfunction的着色
Diffstat (limited to 'script/method')
-rw-r--r-- | script/method/textDocument/semanticTokens.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/script/method/textDocument/semanticTokens.lua b/script/method/textDocument/semanticTokens.lua index 99cdce18..90abfbb8 100644 --- a/script/method/textDocument/semanticTokens.lua +++ b/script/method/textDocument/semanticTokens.lua @@ -67,6 +67,17 @@ local Care = { or source[1] == 'self' then return end + local value = source:bindValue() + local func = value:getFunction() + if func and func:getSource().name == source then + sources[#sources+1] = { + start = source.start, + finish = source.finish, + type = TokenTypes.interface, + modifieres = TokenModifiers.declaration, + } + return + end sources[#sources+1] = { start = source.start, finish = source.finish, |