Some checks are pending
Check Lua Formatting in MyRepo / Stylua Check (push) Waiting to run
50 lines
1.4 KiB
Lua
50 lines
1.4 KiB
Lua
return {
|
|
'rcarriga/nvim-notify',
|
|
opts = {
|
|
timeout = 5000,
|
|
stages = 'static',
|
|
},
|
|
config = function(_, opts)
|
|
local notify = require('notify')
|
|
notify.setup(opts)
|
|
|
|
-- Override vim.notify to filter out noisy LSP messages
|
|
local original_notify = vim.notify
|
|
vim.notify = function(msg, level, notify_opts)
|
|
-- Suppress Node.js warnings
|
|
if type(msg) == 'string' and msg:match('ExperimentalWarning: SQLite') then
|
|
return
|
|
end
|
|
if type(msg) == 'string' and msg:match('DeprecationWarning.*punycode') then
|
|
return
|
|
end
|
|
|
|
-- Suppress copilot errors (harmless race conditions)
|
|
if type(msg) == 'string' and msg:match('Cannot find request.*whilst attempting to cancel') then
|
|
return
|
|
end
|
|
if type(msg) == 'string' and msg:match('AbortError: The operation was aborted') then
|
|
return
|
|
end
|
|
if type(msg) == 'string' and msg:match('rate limit exceeded') then
|
|
return
|
|
end
|
|
if type(msg) == 'string' and msg:match('Rate limited by server') then
|
|
return
|
|
end
|
|
|
|
-- Suppress bashls parsing/formatting errors
|
|
if type(msg) == 'string' and msg:match('Error while parsing file://') then
|
|
return
|
|
end
|
|
if type(msg) == 'string' and msg:match('Error while formatting.*Shfmt') then
|
|
return
|
|
end
|
|
|
|
original_notify(msg, level, notify_opts)
|
|
end
|
|
|
|
-- Set as default notifier
|
|
vim.notify = notify
|
|
end,
|
|
}
|