Skip to content

Instantly share code, notes, and snippets.

@dmmulroy
Created April 1, 2024 15:42
Show Gist options
  • Save dmmulroy/db8f247e5beaaf5fe76305bbcc512db3 to your computer and use it in GitHub Desktop.
Save dmmulroy/db8f247e5beaaf5fe76305bbcc512db3 to your computer and use it in GitHub Desktop.
return {
{
"rcarriga/nvim-notify",
keys = {
{
"<leader>un",
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Dismiss All Notifications",
},
},
opts = {
stages = "static",
timeout = 3000,
max_height = function()
return math.floor(vim.o.lines * 0.75)
end,
max_width = function()
return math.floor(vim.o.columns * 0.75)
end,
on_open = function(win)
vim.api.nvim_win_set_config(win, { zindex = 100 })
end,
},
init = function()
-- when noice is not enabled, install notify on VeryLazy
if not LazyVim.has("noice.nvim") then
LazyVim.on_very_lazy(function()
local notify = require("notify")
---@diagnostic disable-next-line: duplicate-set-field
vim.notify = function(message, level, opts)
return notify(message, level, opts)
end
end)
end
end,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment