mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 11:27:26 +10:00
feat(lsp): support refreshing workspace diagnostics
This commit is contained in:
@@ -395,9 +395,17 @@ function M.on_refresh(err, _, ctx)
|
||||
if err then
|
||||
return vim.NIL
|
||||
end
|
||||
for bufnr in pairs(vim.lsp.get_client_by_id(ctx.client_id).attached_buffers or {}) do
|
||||
if bufstates[bufnr] and bufstates[bufnr].pull_kind == 'document' then
|
||||
refresh(bufnr)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
if
|
||||
client.server_capabilities.diagnosticProvider
|
||||
and client.server_capabilities.diagnosticProvider.workspaceDiagnostics
|
||||
then
|
||||
M._workspace_diagnostics(ctx)
|
||||
else
|
||||
for bufnr in pairs(client.attached_buffers or {}) do
|
||||
if bufstates[bufnr] and bufstates[bufnr].pull_kind == 'document' then
|
||||
refresh(bufnr)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user