summaryrefslogtreecommitdiff
path: root/script/provider/diagnostic.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-04 19:35:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-04 19:35:28 +0800
commit87834511ff48f68a1e972c8e8ec78c8d2dcf71e7 (patch)
tree3e8c29923720a2a23b4da59e146e29f11bff3118 /script/provider/diagnostic.lua
parenta694873f15841e7138228b92f1fb28d8f4756900 (diff)
downloadlua-language-server-87834511ff48f68a1e972c8e8ec78c8d2dcf71e7.zip
update
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r--script/provider/diagnostic.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index a9132e70..34ac1e17 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -283,7 +283,7 @@ function m.refresh(uri)
end
---@async
-local function askForDisable()
+local function askForDisable(uri)
if m.dontAskedForDisable then
return
end
@@ -315,6 +315,7 @@ local function askForDisable()
key = 'Lua.diagnostics.workspaceDelay',
action = 'set',
value = delay * 1000,
+ uri = uri,
}
}
elseif item.title == lang.script.WINDOW_DISABLE_DIAGNOSTIC then
@@ -323,6 +324,7 @@ local function askForDisable()
key = 'Lua.diagnostics.workspaceDelay',
action = 'set',
value = -1,
+ uri = uri,
}
}
end
@@ -351,7 +353,10 @@ function m.diagnosticsScope(uri, force)
bar:onCancel(function ()
log.debug('Cancel workspace diagnostics')
cancelled = true
- await.call(askForDisable)
+ ---@async
+ await.call(function ()
+ askForDisable(uri)
+ end)
end)
local uris = files.getAllUris()
for i, uri in ipairs(uris) do