summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-05 20:19:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-05 20:19:13 +0800
commite89ccc2b6ea6be1282f9da80f366c267bccf5efc (patch)
treedd76d61e476b3050e1cfe27482a6040094b480e0 /script/provider
parent70e83968473caa16355a380e7a4ab438f5fdd00a (diff)
downloadlua-language-server-e89ccc2b6ea6be1282f9da80f366c267bccf5efc.zip
fix completion
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/completion.lua4
-rw-r--r--script/provider/semantic-tokens.lua4
2 files changed, 8 insertions, 0 deletions
diff --git a/script/provider/completion.lua b/script/provider/completion.lua
index ec2ac6c7..9bcccc66 100644
--- a/script/provider/completion.lua
+++ b/script/provider/completion.lua
@@ -71,6 +71,10 @@ local function disable(uri)
end
config.watch(function (uri, key, value)
+ if key == '' then
+ key = 'Lua.completion.enable'
+ value = config.get(uri, key)
+ end
if key == 'Lua.completion.enable' then
if value == true then
enable(uri)
diff --git a/script/provider/semantic-tokens.lua b/script/provider/semantic-tokens.lua
index f6acb280..b867359f 100644
--- a/script/provider/semantic-tokens.lua
+++ b/script/provider/semantic-tokens.lua
@@ -110,6 +110,10 @@ local function refresh()
end
config.watch(function (uri, key, value, oldValue)
+ if key == '' then
+ key = 'Lua.color.mode'
+ value = config.get(uri, key)
+ end
if key == 'Lua.color.mode' then
if value == 'Semantic' or value == 'SemanticEnhanced' then
if isEnable and value ~= oldValue then