lsp: Fire LspDiagnosticsChanged before returning (#13483)

Run hook even when transitioning from some diagnostics to no diagnostics
This commit is contained in:
Josh French
2020-12-23 17:29:37 -05:00
committed by GitHub
parent d0668b36a3
commit 6eecd4230d

View File

@@ -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 {{{