diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2021-09-18 13:21:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 13:21:54 +0200 |
commit | 8ef2b56cac895c151345cf0ff0a97456c0a7fdd2 (patch) | |
tree | 891d7bbb1632a8fe231fa6f258a58b69e5eefefe /runtime/lua/vim/lsp/diagnostic.lua | |
parent | 1f49268c46fcbe65f7e2e2cb620e6f51c059cf9e (diff) | |
parent | 0dcf4ab27bc363b54a4274399f2367d914773347 (diff) | |
download | rneovim-8ef2b56cac895c151345cf0ff0a97456c0a7fdd2.tar.gz rneovim-8ef2b56cac895c151345cf0ff0a97456c0a7fdd2.tar.bz2 rneovim-8ef2b56cac895c151345cf0ff0a97456c0a7fdd2.zip |
fix(diagnostic): change default severity_sort order
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r-- | runtime/lua/vim/lsp/diagnostic.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index 41c8bd36ec..148836a93a 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -1,5 +1,3 @@ -local log = require('vim.lsp.log') - ---@brief lsp-diagnostic --- ---@class Diagnostic @@ -202,11 +200,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") @@ -468,10 +464,7 @@ function M.set_signs(diagnostics, bufnr, client_id, _, opts) opts.severity = {min=severity_lsp_to_vim(opts.severity_limit)} end - local ok = vim.diagnostic._set_signs(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id), opts) - if not ok then - log.debug("Failed to place signs:", diagnostics) - end + vim.diagnostic._set_signs(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id), opts) end --- Set underline for given diagnostics |