summaryrefslogtreecommitdiff
path: root/script/provider/semantic-tokens.lua
diff options
context:
space:
mode:
authorArcanox <arcanox@arcanox.me>2021-09-24 02:53:39 -0500
committerArcanox <arcanox@arcanox.me>2021-09-24 02:53:39 -0500
commit9df85719fb0e2e91f1e6d5621adb3063a64594c0 (patch)
tree7c5c25382b276166a415f42aaa665bcf909ad776 /script/provider/semantic-tokens.lua
parent0c8c6bbf23082d0b858646846a47a3001f718ae2 (diff)
downloadlua-language-server-9df85719fb0e2e91f1e6d5621adb3063a64594c0.zip
Improve classification of semantic tokens to provide a great number more syntax highlighting options (almost on par with TypeScript in VSCode)
Diffstat (limited to 'script/provider/semantic-tokens.lua')
-rw-r--r--script/provider/semantic-tokens.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua
index 448bbe2a..0c28b8b8 100644
--- a/script/provider/semantic-tokens.lua
+++ b/script/provider/semantic-tokens.lua
@@ -108,8 +108,12 @@ end
config.watch(function (key, value)
if key == 'Lua.color.mode' then
- if value == 'Semantic' then
- enable()
+ if value == 'Semantic' or value == 'SemanticEnhanced' then
+ if isEnable then
+ refresh()
+ else
+ enable()
+ end
else
disable()
end