Fixed/changed some nvim notification/errors stuff
This commit is contained in:
@@ -50,6 +50,14 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
messages = {
|
||||
enabled = true, -- enables the Noice messages UI
|
||||
view = 'notify', -- default view for messages
|
||||
view_error = 'messages', -- view for errors
|
||||
view_warn = 'notify', -- view for warnings
|
||||
view_history = 'messages', -- view for :messages
|
||||
view_search = false, -- view for search count messages. Set to `false` to disable
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
cmdline = {
|
||||
enabled = true, -- enables the Noice cmdline UI
|
||||
@@ -69,29 +77,30 @@ return {
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
-- NOTE: filters errors from the command line
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
kind = 'search_count',
|
||||
error = true,
|
||||
cmdline = true,
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
{
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
kind = '',
|
||||
find = 'written',
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
{
|
||||
view = 'popup',
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
kind = '',
|
||||
find = 'written',
|
||||
},
|
||||
-- opts = { skip = true },
|
||||
},
|
||||
-- TODO: Do I need this?
|
||||
-- {
|
||||
-- filter = {
|
||||
-- event = 'msg_show',
|
||||
-- kind = 'search_count',
|
||||
-- },
|
||||
-- opts = { skip = true },
|
||||
-- },
|
||||
-- {
|
||||
-- filter = {
|
||||
-- event = 'msg_show',
|
||||
-- kind = '',
|
||||
-- find = 'written',
|
||||
-- },
|
||||
-- -- opts = { skip = true },
|
||||
-- },
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
|
||||
@@ -159,33 +159,34 @@ return {
|
||||
gitbrowse = {},
|
||||
image = {},
|
||||
input = {},
|
||||
notifier = {
|
||||
---@type snacks.notifier.style
|
||||
style = 'compact',
|
||||
filter = function(notif)
|
||||
local exact_filter = { 'No information available', 'No code actions available' }
|
||||
local contains_filter = {
|
||||
'lines',
|
||||
'fewer lines',
|
||||
'lines indented',
|
||||
'lines yanked',
|
||||
'more lines',
|
||||
'lines moved',
|
||||
'E486:',
|
||||
}
|
||||
for _, msg in ipairs(exact_filter) do
|
||||
if notif.msg == msg then
|
||||
return false
|
||||
end
|
||||
end
|
||||
for _, msg in ipairs(contains_filter) do
|
||||
if string.find(notif.msg, msg) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
-- TODO: do I need this still?
|
||||
-- notifier = {
|
||||
-- ---@type snacks.notifier.style
|
||||
-- style = 'compact',
|
||||
-- filter = function(notif)
|
||||
-- local exact_filter = { 'No information available', 'No code actions available' }
|
||||
-- local contains_filter = {
|
||||
-- 'lines',
|
||||
-- 'fewer lines',
|
||||
-- 'lines indented',
|
||||
-- 'lines yanked',
|
||||
-- 'more lines',
|
||||
-- 'lines moved',
|
||||
-- 'E486:',
|
||||
-- }
|
||||
-- for _, msg in ipairs(exact_filter) do
|
||||
-- if notif.msg == msg then
|
||||
-- return false
|
||||
-- end
|
||||
-- end
|
||||
-- for _, msg in ipairs(contains_filter) do
|
||||
-- if string.find(notif.msg, msg) then
|
||||
-- return false
|
||||
-- end
|
||||
-- end
|
||||
-- return true
|
||||
-- end,
|
||||
-- },
|
||||
picker = {},
|
||||
quickfile = {},
|
||||
terminal = {
|
||||
|
||||
Reference in New Issue
Block a user