rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
3.09k stars 83 forks source link

Feature Request: behaviors of notification look like vscode #84

Closed zhang-stephen closed 2 years ago

zhang-stephen commented 2 years ago

as title said, I hope the notification could be configured as popped from bottom right of screen, just like visual studio code.

rcarriga commented 2 years ago

The animation style is completely configurable https://github.com/rcarriga/nvim-notify#animation-style so you can define your own style. I've no clue how VS Code notifications appear but I'd be happy to accept a PR to add a similar style to built-in ones :smile:

rcarriga commented 2 years ago

I've made the existing util function more generic so you can supply a direction to start notifications from. You can copy the stages for the stages you want and change the direction (like in this line https://github.com/rcarriga/nvim-notify/blob/master/lua/notify/stages/fade_in_slide_out.lua#L9) to BOTTOM_UP to get notifications from the bottom.

zhang-stephen commented 2 years ago

I will have a try.

rcarriga commented 2 years ago

Closing this as I believe it is solved. Reopen if not the case

akinsho commented 2 years ago

@rcarriga would you be open to a PR to make setting this to open from the bottom require less boilerplate, e.g. allowing the stages to be functions that used internally get passed a default but if imported by the user can be passed a direction, or just adding the bottom position variant (which is less flexible). As the current strategy requires adding approx 60 lines of code, a user likely doesn't need or want to understand for the use case of just changing the positioning of the notification.

rcarriga commented 2 years ago

Yes I suppose enough people have wanted this feature in some form or another, allowing for customising the direction would be more beneficial than not, so if someone wants to create a PR I'll happily review :+1: