diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-07 11:12:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-07 11:12:30 +0800 |
commit | 336c0b712babf2f5a0dec2c2f27963d5e568eff2 (patch) | |
tree | c75c44f46eb66f8e49f1e1ef5cb27fb4c2c9e59d /script/core | |
parent | 73c4266110bd1013610db15a7e19d40498687b09 (diff) | |
download | lua-language-server-336c0b712babf2f5a0dec2c2f27963d5e568eff2.zip |
improve changing config from server side
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/code-action.lua | 8 | ||||
-rw-r--r-- | script/core/command/setConfig.lua | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/script/core/code-action.lua b/script/core/code-action.lua index 3fd58c81..ec43d166 100644 --- a/script/core/code-action.lua +++ b/script/core/code-action.lua @@ -64,7 +64,7 @@ local function disableDiagnostic(uri, code, start, results) kind = 'quickfix', command = { title = lang.script.COMMAND_DISABLE_DIAG, - command = 'lua.config', + command = 'lua.setConfig:' .. sp:get_id(), arguments = { { key = 'Lua.diagnostics.disable', @@ -101,7 +101,7 @@ local function markGlobal(uri, name, results) kind = 'quickfix', command = { title = lang.script.COMMAND_MARK_GLOBAL, - command = 'lua.config', + command = 'lua.setConfig:' .. sp:get_id(), arguments = { { key = 'Lua.diagnostics.globals', @@ -120,7 +120,7 @@ local function changeVersion(uri, version, results) kind = 'quickfix', command = { title = lang.script.COMMAND_RUNTIME_VERSION, - command = 'lua.config', + command = 'lua.setConfig:' .. sp:get_id(), arguments = { { key = 'Lua.runtime.version', @@ -233,7 +233,7 @@ local function solveSyntaxUnicodeName(uri, err, results) kind = 'quickfix', command = { title = lang.script.COMMAND_UNICODE_NAME, - command = 'lua.config', + command = 'lua.setConfig:' .. sp:get_id(), arguments = { { key = 'Lua.runtime.unicodeName', diff --git a/script/core/command/setConfig.lua b/script/core/command/setConfig.lua new file mode 100644 index 00000000..c5fc3f44 --- /dev/null +++ b/script/core/command/setConfig.lua @@ -0,0 +1,5 @@ +local client = require 'provider.client' + +return function (data) + client.setConfig(data.key, data.action, data.value, data.isGlobal, data.uri) +end |