rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
3k stars 80 forks source link

feat(config): allow setting a default direction #127

Closed akinsho closed 2 years ago

akinsho commented 2 years ago

This allows setting config.direction and refactors each stage to be a function which takes the direction as an argument. The direction from the config is then passed to the style that is set.

Not sure what your thoughts are re. this approach @rcarriga, if it seems alright to you then I'll add some docs for it

akinsho commented 2 years ago

This relates to https://github.com/rcarriga/nvim-notify/issues/84#issuecomment-1229204298

rcarriga commented 2 years ago

Thanks for the PR! I think this looks good except for that the stages don't actually implement all values for direction. I'm not sure they should either because it might make them a lot more complex trying to handle all of the conditions.

Either let's change the config option to a boolean top_down or something like that or you can add support to the stages if you feel it's not much difference.

akinsho commented 2 years ago

@rcarriga I've refactored the option to just be a boolean. Making them all work with more directions is tbh not the feature I personally was wanting, just seemed like an added bonus but ultimately all I want is for notifications to appear on the bottom.

rcarriga commented 2 years ago

Thanks again!

AlexvZyl commented 2 years ago

Nice!