mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
feat(diagnostic)!: make DiagnosticChanged a first class autocmd (#16098)
This allows users to hook into diagnostic events with finer granularity (e.g. per-buffer or file). BREAKING CHANGE: DiagnosticsChanged and LspDiagnosticsChanged user autocommands are removed.
This commit is contained in:
@ -220,9 +220,6 @@ function M.on_publish_diagnostics(_, result, ctx, config)
|
||||
end
|
||||
|
||||
vim.diagnostic.set(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id))
|
||||
|
||||
-- Keep old autocmd for back compat. This should eventually be removed.
|
||||
vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged")
|
||||
end
|
||||
|
||||
--- Clear diagnotics and diagnostic cache.
|
||||
|
Reference in New Issue
Block a user