alpha-nvim icon indicating copy to clipboard operation
alpha-nvim copied to clipboard

Alpha dashboard it not centered when open neo-tree

Open thieung opened this issue 3 years ago • 3 comments

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?

thieung avatar May 07 '22 02:05 thieung

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..

goolord avatar May 07 '22 07:05 goolord

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.

hermitmaster avatar May 09 '22 13:05 hermitmaster

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?

mrbjarksen avatar May 27 '22 11:05 mrbjarksen

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

latipun7 avatar Sep 21 '22 06:09 latipun7

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

goolord avatar May 09 '23 18:05 goolord

just testing it looks good to me now

goolord avatar May 09 '23 18:05 goolord

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

goolord avatar May 09 '23 22:05 goolord