summaryrefslogtreecommitdiff
path: root/script/provider/semantic-tokens.lua
diff options
context:
space:
mode:
authorArcanox <arcanox@arcanox.me>2021-09-25 00:20:02 -0500
committerArcanox <arcanox@arcanox.me>2021-09-25 00:20:02 -0500
commita465b35d5eefc11c1daf3c29b41ce95ee098a782 (patch)
tree4d75d02b753f5d39cfab28ce961d5b4862fdb094 /script/provider/semantic-tokens.lua
parent9df85719fb0e2e91f1e6d5621adb3063a64594c0 (diff)
downloadlua-language-server-a465b35d5eefc11c1daf3c29b41ce95ee098a782.zip
Fix the config setting not updating editors when it's changed
Diffstat (limited to 'script/provider/semantic-tokens.lua')
-rw-r--r--script/provider/semantic-tokens.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua
index 0c28b8b8..023c9e7e 100644
--- a/script/provider/semantic-tokens.lua
+++ b/script/provider/semantic-tokens.lua
@@ -42,7 +42,7 @@ local function enable()
tokenModifiers = toArray(define.TokenModifiers),
},
range = true,
- full = false,
+ full = true,
},
},
}
@@ -106,10 +106,10 @@ local function refresh()
proto.request('workspace/semanticTokens/refresh', json.null)
end
-config.watch(function (key, value)
+config.watch(function (key, value, oldValue)
if key == 'Lua.color.mode' then
if value == 'Semantic' or value == 'SemanticEnhanced' then
- if isEnable then
+ if isEnable and value ~= oldValue then
refresh()
else
enable()