goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.84k stars 109 forks source link

Alpha dashboard it not centered when open neo-tree #110

Closed thieung closed 1 year ago

thieung commented 2 years ago

With dashboard-nvim, when I open neo-tree, it still centered. But after movibng to alpha-nvim, it's not. See below screenshot:

image

Should we make it always be centered like dashboard-nvim?

goolord commented 2 years ago

yes the intent is for it to be centered, alpha will redraw (and thus center) for nvim-tree, I didn't consider that another plugin like this wouldn't fire the same autocmd events..

hermitmaster commented 2 years ago

I have the same problem with nvim-tree.lua when setting the option open_on_setup = true. If I leave and reenter the Alpha window, it redraws and centers correctly.

mrbjarksen commented 2 years ago

I've experienced a similar issue with command line auto-completion (using nvim-cmp), where alpha is redrawn every time a new popup appears. This normally wouldn't be an issue, but I'm using a randomized header function so this is jarring. I assume both of these issues are caused by a WinNew autocommand. Perhaps this should be user configurable?

latipun7 commented 1 year ago

It works on nvim-tree, but in neo-tree, when neo-tree is closed, the cursor is not in alpha menu, when I move cursor down to the menu, it works and alpha is centered. Any workaround? thanks

https://user-images.githubusercontent.com/20012970/191427003-fc0a1593-a821-4cca-8a51-420d07550fcf.mp4

goolord commented 1 year ago

using the new-ish WinResized this should be fixed https://github.com/goolord/alpha-nvim/commit/1dcd325e2e5dcfe40de48013bc587adc5f74582a

goolord commented 1 year ago

just testing it looks good to me now

goolord commented 1 year ago

note: this https://github.com/goolord/alpha-nvim/commit/1dcd325e2e5dcfe40de48013bc587adc5f74582a only works on neovim version 0.10 or greater, so if you're on an older version of neovim this still be broken, and i have no intention of hacking together a solution without WinResized