refactor(diagnostic): combine config() and set() calls

This commit is contained in:
Gregory Anders
2021-09-17 19:57:31 -06:00
parent 15d501ff7a
commit 445ef41314

View File

@@ -202,11 +202,9 @@ function M.on_publish_diagnostics(_, result, ctx, config)
end end
end end
end end
vim.diagnostic.config(config, namespace)
end end
vim.diagnostic.set(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id)) vim.diagnostic.set(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id), config)
-- Keep old autocmd for back compat. This should eventually be removed. -- Keep old autocmd for back compat. This should eventually be removed.
vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged") vim.api.nvim_command("doautocmd <nomodeline> User LspDiagnosticsChanged")