feat(noice): add config to noice and notify
This commit is contained in:
@@ -1,4 +1,36 @@
|
||||
local focused = true
|
||||
|
||||
vim.api.nvim_create_autocmd("FocusGained", {
|
||||
callback = function()
|
||||
focused = true
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FocusLost", {
|
||||
callback = function()
|
||||
focused = false
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
require("noice").setup({
|
||||
table.insert(opts.routes, {
|
||||
filter = {
|
||||
event = "notify",
|
||||
find = "No information available",
|
||||
},
|
||||
opts = { skip = true },
|
||||
}),
|
||||
|
||||
table.insert(opts.routes, 1, {
|
||||
filter = {
|
||||
cond = function()
|
||||
return not focused
|
||||
end,
|
||||
},
|
||||
view = "notify_send",
|
||||
opts = { stop = false },
|
||||
}),
|
||||
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
|
||||
Reference in New Issue
Block a user