mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
feat(notifier): added gap option. Closes #2331
This commit is contained in:
parent
c4c644f483
commit
b1acbb0fcc
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue