From b1acbb0fcce9ed1ead3fd511eb934eeefe238b69 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Oct 2025 20:30:22 +0200 Subject: [PATCH] feat(notifier): added `gap` option. Closes #2331 --- lua/snacks/notifier.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/snacks/notifier.lua b/lua/snacks/notifier.lua index 80e06af2..33494fe9 100644 --- a/lua/snacks/notifier.lua +++ b/lua/snacks/notifier.lua @@ -116,6 +116,7 @@ local defaults = { -- editor margin to keep free. tabline and statusline are taken into account automatically margin = { top = 0, right = 1, bottom = 0 }, padding = true, -- add 1 cell of left/right padding to the notification window + gap = 0, -- gap between notifications sort = { "level", "added" }, -- sort by level and time -- minimum log level to display. TRACE is the lowest -- all notifications are stored in history @@ -694,7 +695,7 @@ function N:layout() end notif.layout.top = layout.find(notif.layout.height, notif.layout.top) if notif.layout.top then - layout.mark(notif.layout.top, notif.layout.height, false) + layout.mark(notif.layout.top, notif.layout.height + (self.opts.gap or 0), false) if not vim.deep_equal(prev_layout, notif.layout) then if notif.win:win_valid() then wins_updated = wins_updated + 1