feat: suppressed error messages from lang servers and added better glyph for publish diagnostics

navigator
Pocco81 3 years ago
parent 665fa24783
commit 1e2d299bf9

@ -94,3 +94,29 @@ vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnos
vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"})
vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"})
vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"})
vim.lsp.handlers["textDocument/publishDiagnostics"] =
vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics,
{
virtual_text = {
-- prefix = "",
prefix = "",
spacing = 0
},
signs = true,
underline = true
}
)
-- suppress error messages from lang servers
vim.notify = function(msg, log_level, _opts)
if msg:match("exit code") then
return
end
if log_level == vim.log.levels.ERROR then
vim.api.nvim_err_writeln(msg)
else
vim.api.nvim_echo({{msg}}, true, {})
end
end

Loading…
Cancel
Save