diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 20:14:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 20:14:13 +0800 |
commit | 0d3dce5321332022552fca038e2e2d35985235c6 (patch) | |
tree | 841813a24eee3c44f7a162a53ebeb5c17a4d012a /script/provider/client.lua | |
parent | b578d3d0c16f992e29657c3cad8ef9c3dd7d6a2c (diff) | |
download | lua-language-server-0d3dce5321332022552fca038e2e2d35985235c6.zip |
cleanup
Diffstat (limited to 'script/provider/client.lua')
-rw-r--r-- | script/provider/client.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/script/provider/client.lua b/script/provider/client.lua index 5c2ae653..afb0a98f 100644 --- a/script/provider/client.lua +++ b/script/provider/client.lua @@ -1,6 +1,7 @@ local nonil = require 'without-check-nil' local util = require 'utility' local lang = require 'language' +local proto = require 'proto' local m = {} @@ -28,6 +29,23 @@ function m.isVSCode() return m._isvscode end +---set client config +---@param key string +---@param action '"set"'|'"add"' +---@param value any +---@param isGlobal boolean +function m.setConfig(key, action, value, isGlobal) + proto.notify('$/command', { + command = 'lua.config', + data = { + key = key, + action = action, + value = value, + global = isGlobal, + } + }) +end + function m.init(t) log.debug('Client init', util.dump(t)) m.info = t |