Closed mikesmithgh closed 1 year ago
I'd rather avoid configs like this because they require making identical changes to each of the stages. However the stages are designed to be easily customised. I've actually been using something very similar myself
local stages = require("notify.stages.slide")("top_down")
local notify = require("notify")
notify.setup({
render = "compact",
stages = {
function(...)
local opts = stages[1](...)
if opts then
opts.border = "none"
end
return opts
end,
unpack(stages, 2),
},
...
})
This worked perfectly. Thanks! Below is the config I went with.
return {
'rcarriga/nvim-notify',
enabled = true,
config = function()
local stages = require("notify.stages.slide")("top_down")
local notify = require("notify")
notify.setup({
render = "compact",
stages = {
function(...)
local opts = stages[1](...)
if opts then
opts.border = "none"
opts.row = opts.row + 1
end
return opts
end,
unpack(stages, 2),
},
timeout = 2000,
})
end
}
Learned about variable arguments in Lua too 🙂
I am currently using the compact view and would like to disable borders. I achieved this by modiying https://github.com/rcarriga/nvim-notify/blob/master/lua/notify/stages/fade_in_slide_out.lua#L18 to![Screenshot 2023-03-01 at 11 23 47 PM](https://user-images.githubusercontent.com/10135646/222330760-6ca24903-fe12-40ac-84fa-2fec77f9a0e2.png)
border = "none",
Here a screenshot:This is a feature request to let the user configure border options. Thanks!