From 445ef41314fceec50b1576ffcfc497781e9759d8 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Fri, 17 Sep 2021 19:57:31 -0600 Subject: refactor(diagnostic): combine config() and set() calls --- runtime/lua/vim/lsp/diagnostic.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index 41c8bd36ec..16edf45383 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -202,11 +202,9 @@ function M.on_publish_diagnostics(_, result, ctx, config) end end end - - vim.diagnostic.config(config, namespace) 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. vim.api.nvim_command("doautocmd User LspDiagnosticsChanged") -- cgit