summaryrefslogtreecommitdiff
path: root/script/core/semantic-tokens.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-03 18:01:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-03 18:01:33 +0800
commit4207139b9b4ad18eac241066a9df43683f165aec (patch)
tree794155f3a0541d5f462dfbb6af2a16aee202c3a4 /script/core/semantic-tokens.lua
parentaf11a2d94eceb5993aeb72cdd8ff6736a77a916c (diff)
downloadlua-language-server-4207139b9b4ad18eac241066a9df43683f165aec.zip
add semantic token for generic type
Diffstat (limited to 'script/core/semantic-tokens.lua')
-rw-r--r--script/core/semantic-tokens.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua
index 668103f7..fdb792da 100644
--- a/script/core/semantic-tokens.lua
+++ b/script/core/semantic-tokens.lua
@@ -105,6 +105,15 @@ Care['doc.tailcomment'] = function (source, results)
type = define.TokenTypes.comment,
}
end
+Care['doc.type.name'] = function (source, results)
+ if source.typeGeneric then
+ results[#results+1] = {
+ start = source.start,
+ finish = source.finish,
+ type = define.TokenTypes.macro,
+ }
+ end
+end
local function buildTokens(results, text, lines)
local tokens = {}