-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
I'm using packer.nvim, and have this setup:
local originalNotify = vim.notify
use {
'rcarriga/nvim-notify',
config = function()
vim.keymap.set('n', '<leader>m', '<cmd>lua require("telescope").extensions.notify.notify()<cr>',
{ silent = true, noremap = true })
print('overriding vim.notify')
vim.notify = function(msg, level, opts)
if string.find(msg, "Neo") and string.find(msg, "tree") then
print('ya')
return originalNotify(msg, level, opts)
end
print('no')
require("notify")(msg, level, opts)
end
require('notify').setup()
end
}and when booting, I see that "overriding vim.notify" prints, but then doesn't get called.
To test I've been doing :lua vim.notify('[Neo-tree]'), and success is when I don't see an nvim-notify toast message -- but this has yet to happen.
sometimes the conents of the custom function print, and other times they don't.
feels like a race condition between me setting vim.notify and nvim-notify setting it.
what is the proper way to filter messages?
Related: nvim-neo-tree/neo-tree.nvim#1790
See also:
Metadata
Metadata
Assignees
Labels
No labels
