diff options
author | sumneko <sumneko@hotmail.com> | 2021-11-27 18:43:01 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2021-11-27 18:43:01 +0800 |
commit | d059e2b88c755d9f8344e6702d17763257285fc2 (patch) | |
tree | 509db14bd970258f37cadeb6e32d1bab6840295a | |
parent | c257b0295b5f21350f8d22d1196569f69c0991b6 (diff) | |
download | lua-language-server-d059e2b88c755d9f8344e6702d17763257285fc2.zip |
fix
-rw-r--r-- | script/client.lua | 8 | ||||
-rw-r--r-- | script/config/config.lua | 2 | ||||
-rw-r--r-- | script/workspace/scope.lua | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/script/client.lua b/script/client.lua index c7e12fbf..c4e545f4 100644 --- a/script/client.lua +++ b/script/client.lua @@ -190,7 +190,7 @@ end ---@param changes config.change[] local function applyConfig(cfg, changes) for _, change in ipairs(changes) do - cfg[change.key] = config.getRaw(change.key) + cfg[change.key] = config.getRaw(change.uri, change.key) end end @@ -274,17 +274,17 @@ function m.setConfig(changes, onlyMemory) local finalChanges = {} for _, change in ipairs(changes) do if change.action == 'add' then - local suc = config.add(change.key, change.value) + local suc = config.add(change.uri, change.key, change.value) if suc then finalChanges[#finalChanges+1] = change end elseif change.action == 'set' then - local suc = config.set(change.key, change.value) + local suc = config.set(change.uri, change.key, change.value) if suc then finalChanges[#finalChanges+1] = change end elseif change.action == 'prop' then - local suc = config.prop(change.key, change.prop, change.value) + local suc = config.prop(change.uri, change.key, change.prop, change.value) if suc then finalChanges[#finalChanges+1] = change end diff --git a/script/config/config.lua b/script/config/config.lua index a3525124..ed93078f 100644 --- a/script/config/config.lua +++ b/script/config/config.lua @@ -414,4 +414,6 @@ function m.event(key, value, oldValue) } end +m.update(scope.fallback, {}) + return m diff --git a/script/workspace/scope.lua b/script/workspace/scope.lua index 8bf91c71..0035fc63 100644 --- a/script/workspace/scope.lua +++ b/script/workspace/scope.lua @@ -50,7 +50,7 @@ end ---@return scope local function createScope(scopeType) local scope = setmetatable({ - type = 'folder', + type = scopeType, _links = {}, _data = {}, }, mt) |