diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-07-30 17:46:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2024-07-30 17:46:00 +0800 |
commit | aae2c7888bad227b6df897b97c01f123744175de (patch) | |
tree | a1947eaa8a9a1e4d1d95d4e2bb68337efe4b9390 /script/lclient.lua | |
parent | e760b69c8104d0bf6ef17f6f033265908557743d (diff) | |
download | lua-language-server-aae2c7888bad227b6df897b97c01f123744175de.zip |
过测试
Diffstat (limited to 'script/lclient.lua')
-rw-r--r-- | script/lclient.lua | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/script/lclient.lua b/script/lclient.lua index 13b431b0..96a6c16f 100644 --- a/script/lclient.lua +++ b/script/lclient.lua @@ -5,6 +5,8 @@ local await = require 'await' local timer = require 'timer' local pub = require 'pub' local json = require 'json' +local client = require 'client' +local define = require 'proto.define' require 'provider' @@ -61,9 +63,33 @@ function mt:_localLoadFile() end) end +local defaultClientOptions = { + initializationOptions = { + changeConfiguration = true, + viewDocument = true, + trustByClient = true, + useSemanticByRange = true, + }, + capabilities = { + textDocument = { + completion = { + completionItem = { + tagSupport = { + valueSet = { + define.DiagnosticTag.Unnecessary, + define.DiagnosticTag.Deprecated, + }, + }, + }, + }, + }, + }, +} + ---@async function mt:initialize(params) - self:awaitRequest('initialize', params or {}) + local initParams = util.tableMerge(params or {}, defaultClientOptions) + self:awaitRequest('initialize', initParams) self:notify('initialized') end |