goolord / alpha-nvim

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

Wrong skip condition #54

Closed meijieru closed 2 years ago

meijieru commented 2 years ago

This commit should consider the -u ${config_file} case. Currently it skips in that case though it should not.

goolord commented 2 years ago

why should it? if alpha is installed by packer, it's still in your rtp and is still going to run just like every other plugin you have installed

meijieru commented 2 years ago

Sorry, the link is broken. I just update the commit link. Alpha is correctly loaded. It is the condition to activate that needs more considerations.

goolord commented 2 years ago

https://github.com/wbthomason/packer.nvim/issues/307 plugins installed by packer are installed to stdpath('data')/nvim/site/pack/packer/start/ which is always sourced by neovim no matter what config it's reading, unless the --clean flag is passed. I don't think it's unreasonable that someone might want multiple configs that still have the alpha buffer automatically open, since I use nvim that way myself.

the solution to this is to mark alpha opt = true in packer_use i think, or to pass --clean to neovim.

if your config doesn't call alpha.setup the VimEnter autocmd that opens alpha doesn't even get created in the first place

meijieru commented 2 years ago

The plugin is correctly loaded but doesn't show at startup. This behavior comes after that commit. I think the previous behavior is desired, is that correct?

goolord commented 2 years ago

oh, i see what you mean now. yeah i can fix that

goolord commented 2 years ago

pushed https://github.com/goolord/alpha-nvim/commit/b9eae5d1f767da26b03a6c822b80263b27fc0352, it should be more like the old conditions now except slightly more rigorous

goolord commented 2 years ago

lmk if the problem persists for you :black_heart:

meijieru commented 2 years ago

Problem solved. Thx!