notify of all LSP errors
This commit is contained in:
@ -187,6 +187,23 @@ local conditionalSources = {
|
||||
},
|
||||
}
|
||||
|
||||
vim.lsp.handlers["window/showMessage"] = function(_, result, ctx)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
local lvl = ({
|
||||
"ERROR",
|
||||
"WARN",
|
||||
"INFO",
|
||||
"DEBUG",
|
||||
})[result.type]
|
||||
notify({ result.message }, lvl, {
|
||||
title = "LSP | " .. client.name,
|
||||
timeout = 1000,
|
||||
keep = function()
|
||||
return lvl == "ERROR" or lvl == "WARN"
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if use_google() then
|
||||
require("cmp_nvim_ciderlsp").setup()
|
||||
|
||||
@ -212,23 +229,6 @@ if use_google() then
|
||||
notify("ctx:" .. ctx, "info", { timeout = 900 })
|
||||
end
|
||||
|
||||
cider_lsp_handlers["window/showMessage"] = function(_, result, ctx)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
local lvl = ({
|
||||
"ERROR",
|
||||
"WARN",
|
||||
"INFO",
|
||||
"DEBUG",
|
||||
})[result.type]
|
||||
notify({ result.message }, lvl, {
|
||||
title = "LSP | " .. client.name,
|
||||
timeout = 1000,
|
||||
keep = function()
|
||||
return lvl == "ERROR" or lvl == "WARN"
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
capabilities = require("cmp_nvim_ciderlsp").update_capabilities(capabilities)
|
||||
capabilities.workspace.codeLens = { refreshSupport = true }
|
||||
capabilities.workspace.diagnostics = { refreshSupport = true }
|
||||
|
@ -19,7 +19,7 @@ require("nvim-treesitter.configs").setup({
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
-- additional_vim_regex_highlighting = true,
|
||||
additional_vim_regex_highlighting = { "java" },
|
||||
-- additional_vim_regex_highlighting = { "java" },
|
||||
},
|
||||
-- rainbow = {
|
||||
-- enable = true,
|
||||
|
Reference in New Issue
Block a user