rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
2.88k stars 72 forks source link

feat: `wrapped-compact` uses nvim 0.10's inline text for proper padding #277

Open chrisgrieser opened 1 month ago

chrisgrieser commented 1 month ago

Now uses nvim inline text to properly create padding. While I was at it, simplified the code a bit and also fixed two cases where some characters get cut off (notice in the first line of the first before image, the fugiat missing the fug).

before:

Showcase

after:

Showcase

code to test:

local msg = "Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit."

vim.notify(msg, vim.log.levels.INFO, {
    title = "Foobar",
    timeout = false,
})
vim.notify(msg, vim.log.levels.INFO, {
    timeout = false,
})