diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-28 15:33:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-28 15:33:05 +0800 |
commit | 416928fd0cef29591cf404e248cc92eada5a535f (patch) | |
tree | 2bd8fca390f9edba201852357fef8c663fd7ae80 | |
parent | e588667ee5657b6123bfd1e0c6a193710e67f6d3 (diff) | |
download | lua-language-server-416928fd0cef29591cf404e248cc92eada5a535f.zip |
translation later~
-rw-r--r-- | script/provider/diagnostic.lua | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 53197d32..7be65339 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -266,26 +266,22 @@ local function askForDisable() end if item.title == '不再提醒' then m.dontAskedForDisable = true - elseif item.title == '空闲时进行工作区诊断(延迟30秒)' then - proto.request('workspace/executeCommand', { + elseif item.title == '空闲时再进行诊断(延迟30秒)' then + proto.notify('$/command', { command = 'lua.config', - arguments = { - { - key = 'Lua.diagnostics.workspaceDelay', - action = 'set', - value = 30000, - } + data = { + key = 'Lua.diagnostics.workspaceDelay', + action = 'set', + value = 30000, } }) elseif item.title == '禁用工作区诊断' then - proto.request('workspace/executeCommand', { + proto.notify('workspace/executeCommand', { command = 'lua.config', - arguments = { - { - key = 'Lua.diagnostics.workspaceDelay', - action = 'set', - value = -1, - } + data = { + key = 'Lua.diagnostics.workspaceDelay', + action = 'set', + value = -1, } }) end @@ -313,7 +309,7 @@ function m.diagnosticsAll() bar:onCancel(function () log.debug('Cancel workspace diagnostics') cancelled = true - --askForDisable() + askForDisable() end) local uris = files.getAllUris() for i, uri in ipairs(uris) do |