summaryrefslogtreecommitdiff
path: root/script/method/textDocument/semanticTokens.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-05-18 14:58:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-05-18 14:58:13 +0800
commitda43d801df94ed8dce217499afb83aedb1ed24d5 (patch)
tree2567f90ae14797213b88a9144f7d05885314305e /script/method/textDocument/semanticTokens.lua
parent4eb2567da4cb1afd61acc889366119f32d9c4255 (diff)
downloadlua-language-server-da43d801df94ed8dce217499afb83aedb1ed24d5.zip
区分一下localfunction的着色
Diffstat (limited to 'script/method/textDocument/semanticTokens.lua')
-rw-r--r--script/method/textDocument/semanticTokens.lua11
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,