dismiss notifications with Esc

This commit is contained in:
Andy Teijelo 2024-09-23 15:59:13 -04:00
parent 84874e4767
commit 3ad4b16d66

View file

@ -120,3 +120,9 @@ keymap("n", "<F11>", "<cmd>DapStepInto<CR>")
keymap("n", "<S-F11>", "<cmd>DapStepOut<CR>") keymap("n", "<S-F11>", "<cmd>DapStepOut<CR>")
vim.keymap.set("n", "K", require("noice.lsp").hover, { noremap = true, silent = true }) vim.keymap.set("n", "K", require("noice.lsp").hover, { noremap = true, silent = true })
local function dismiss_notifications()
require("notify").dismiss({ silent = true, pending = true })
vim.cmd("noh")
end
vim.keymap.set("n", "<Esc>", dismiss_notifications, { desc = "Dismiss notifications" })