mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
lsp: Fire LspDiagnosticsChanged before returning (#13483)
Run hook even when transitioning from some diagnostics to no diagnostics
This commit is contained in:
@@ -1044,6 +1044,8 @@ function M.display(diagnostics, bufnr, client_id, config)
|
||||
|
||||
diagnostics = diagnostics or M.get(bufnr, client_id)
|
||||
|
||||
vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged")
|
||||
|
||||
if not diagnostics or vim.tbl_isempty(diagnostics) then
|
||||
return
|
||||
end
|
||||
@@ -1062,8 +1064,6 @@ function M.display(diagnostics, bufnr, client_id, config)
|
||||
if signs_opts then
|
||||
M.set_signs(diagnostics, bufnr, client_id, nil, signs_opts)
|
||||
end
|
||||
|
||||
vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged")
|
||||
end
|
||||
-- }}}
|
||||
-- Diagnostic User Functions {{{
|
||||
|
||||
Reference in New Issue
Block a user