-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dismiss notification by id #240
Comments
Would you mind describing the use case to be able to do this? |
In my plugin, I want to keep certain notifications on screen for a bit longer (using the concrete use case: In my plugin tinygit, I want to display commit-diffstats while the user is entering a commit message |
So I was wondering if this was possible as well. I use a notification to show when I'm debugging certain things and it wanted to be able to dismiss just that notification specifically when I finish debugging without closing any other notifications I might have open. I found we can accomplish this by using the current functionality of nvim-notify to replace the original message with a very short timeout so it leaves almost immediately: local debug_notify_id = vim.notify("Debugging...", vim.log.levels.WARN)
-- Once debugging is done:
vim.notify("Debugging...", vim.log.levels.WARN, { timeout = 1, replace = debug_notify_id })
|
Right now, we can use a notification id to replace a notification, and we can use
dismiss
to dismiss all notifications. Would it be possible to dismiss a specific notification by id?The text was updated successfully, but these errors were encountered: