mirror of
https://github.com/cap153/nvim.git
synced 2026-05-11 17:35:59 +08:00
拦截一些不影响使用体验的错误信息
This commit is contained in:
parent
8e6d327b49
commit
d9b2d0ca88
1 changed files with 24 additions and 12 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
return {
|
return {
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
-- OPTIONAL:
|
-- OPTIONAL:
|
||||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
-- If not available, we use `mini` as the fallback
|
-- If not available, we use `mini` as the fallback
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("noice").setup({
|
require("noice").setup({
|
||||||
|
|
@ -27,8 +27,20 @@ return {
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
},
|
},
|
||||||
|
-- 在这里添加或修改 routes 配置
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
kind = "emsg",
|
||||||
|
-- 使用这个错误信息中稳定且独特的片段作为过滤关键词
|
||||||
|
find = "Error in decoration provider",
|
||||||
|
},
|
||||||
|
-- opts.skip = true 会告诉 Noice 完全忽略这条消息
|
||||||
|
opts = { skip = true },
|
||||||
|
},
|
||||||
|
-- ... 这里可能还有你其他的 routes 规则,或者没有
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue