fix(nvim): nvim notify now filters some unwanted messages

This commit is contained in:
Kyren223
2024-08-06 12:29:41 +03:00
parent 1579ac0bda
commit 03a5e641f0

View File

@@ -11,7 +11,18 @@ return {
},
},
opts = function()
vim.notify = require('notify')
-- Filter messages
local filtered_messages = { 'No information available', 'No code actions available' }
---@diagnostic disable-next-line: duplicate-set-field
vim.notify = function(message, level, opts)
opts = opts or {}
for _, msg in ipairs(filtered_messages) do
if message == msg then
return
end
end
return require('notify')(message, level, opts)
end
return {
fps = 60,
render = 'default',