diff options
author | Gregory Anders <greg@gpanders.com> | 2021-09-17 19:57:31 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-09-17 21:07:24 -0600 |
commit | 445ef41314fceec50b1576ffcfc497781e9759d8 (patch) | |
tree | 7f263ce68ff8522ca56965627d5ffe2646febe6c /runtime/lua/vim/lsp/diagnostic.lua | |
parent | 15d501ff7aa37fd507e57069b90ddab8a8eb55c5 (diff) | |
download | rneovim-445ef41314fceec50b1576ffcfc497781e9759d8.tar.gz rneovim-445ef41314fceec50b1576ffcfc497781e9759d8.tar.bz2 rneovim-445ef41314fceec50b1576ffcfc497781e9759d8.zip |
refactor(diagnostic): combine config() and set() calls
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r-- | runtime/lua/vim/lsp/diagnostic.lua | 4 |
1 files changed, 1 insertions, 3 deletions
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 <nomodeline> User LspDiagnosticsChanged") |