From 150a5922aae3ed02c9f4eee7e5f162454c42231c Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 25 Nov 2021 11:55:11 -0700 Subject: 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. --- runtime/lua/vim/lsp/diagnostic.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'runtime/lua/vim/lsp') diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index 76a4dc30b7..3b214c49f9 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -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 User LspDiagnosticsChanged") end --- Clear diagnotics and diagnostic cache. -- cgit