Closed folliehiyuki closed 2 years ago
You can already do this with the on_open
setup option
require("notify").setup({
on_open = function (win)
vim.api.nvim_win_set_config(win, { border = "double" })
end,
})
Oh I didn't think about it :) Closing then.
Thanks for the help!
Never thought about doing it this way
@rcarriga If { border = "none" }
is set, it seems like the space for the border is still allocated in the rendered notifications. Is there a way to collapse these empty rows / cols so that multiple notifications take up less vertical space?
Current behavior:
What I'd like to achieve:
There was a bug in sizing windows without borders which should be fixed now. You'll see still the windows shift initially as they are created with borders. To prevent that, you need to provide custom stages to create the window with no border. Here's a sample
local base_stages = require("notify.stages.fade_in_slide_out")("bottom_up")
local notify = require("notify")
notify.setup({
render = "minimal",
stages = {
function(...)
local opts = base_stages[1](...)
if opts then
opts.border = "none"
end
return opts
end,
unpack(base_stages, 2),
},
})
Thanks for the detailed answer and for the excellent plugin! The new compact rendering style looks great, too.
border = "rounded"
is currently hardcoded in different places.It would be nice to have a variable, and even better if it is configurable with an option in
setup()
function.