feat(notifier): added gap option. Closes #2331

This commit is contained in:
Folke Lemaitre 2025-10-23 20:30:22 +02:00
parent c4c644f483
commit b1acbb0fcc
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -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