diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 19:46:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-30 19:46:03 +0800 |
commit | 76af92ca93ff4c9bf4b6fc62bbc49481a17ea044 (patch) | |
tree | ddd3f3ba07551c9b6ce5be4b74618bd47983c7db /script/provider/semantic-tokens.lua | |
parent | b1c20a1f24cc7e17d446b2ac4e4118c36173dc20 (diff) | |
download | lua-language-server-76af92ca93ff4c9bf4b6fc62bbc49481a17ea044.zip |
update
Diffstat (limited to 'script/provider/semantic-tokens.lua')
-rw-r--r-- | script/provider/semantic-tokens.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua index 2a8013db..f6acb280 100644 --- a/script/provider/semantic-tokens.lua +++ b/script/provider/semantic-tokens.lua @@ -20,7 +20,7 @@ local function toArray(map) end local dontShowAgain = false -local function enable() +local function enable(uri) if isEnable then return end @@ -80,7 +80,7 @@ local function enable() end end -local function disable() +local function disable(uri) if not isEnable then return end @@ -109,16 +109,16 @@ local function refresh() proto.request('workspace/semanticTokens/refresh', json.null) end -config.watch(function (key, value, oldValue) +config.watch(function (uri, key, value, oldValue) if key == 'Lua.color.mode' then if value == 'Semantic' or value == 'SemanticEnhanced' then if isEnable and value ~= oldValue then refresh() else - enable() + enable(uri) end else - disable() + disable(uri) end end if key:find '^Lua.runtime' |