diff options
Diffstat (limited to 'script/provider/semantic-tokens.lua')
-rw-r--r-- | script/provider/semantic-tokens.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua index 5e331ebd..567f80e2 100644 --- a/script/provider/semantic-tokens.lua +++ b/script/provider/semantic-tokens.lua @@ -106,6 +106,21 @@ local function refresh() proto.notify('workspace/semanticTokens/refresh', json.null) end +config.watch(function (key, value) + if key == 'Lua.color.mode' then + if value == 'Semantic' then + enable() + else + disable() + end + end + if key:find '^Lua.runtime' + or key:find '^Lua.workspace' + or key:find '^files' then + refresh() + end +end) + return { enable = enable, disable = disable, |