goolord / alpha-nvim

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

Does not change to directory #156

Closed thesandybridge closed 1 year ago

thesandybridge commented 1 year ago

When selecting a bookmark the cwd does not update to the selected directory. This is preventing other plugins such as ToggleTerm from working seamlessly.

dorrajmachai commented 1 year ago

Hello,

I am having this issue as well. For context, I use vim-startify in my Vim config. In Vim, on the Startify screen, I can move to a recently opened file and hit Enter. I am then moved into that file's directory. I know this because, when opening NERDTree, I can only see files in that directory. So, to describe the problem I'm having when using alpha-nvim:

1.) I enter nv in the terminal from my home directory, as it is an alias for Neovim. 2.) Move to a recently opened file, and hit Enter. 3.) Open nvim-tree to see if I've been moved into the appropriate directory, only to discover that I have not, in fact, been cd'd into the correct place.

Now, given that alpha is basically just applying a theme to the startup page, I am inclined to believe that I have simply misconfigured something, which I am investigating. Once I rule that out (if I rule that out), I will start browsing through code to see if I can find anything. I'm still new to Lua, so that may take some time. Hopefully, I've described this issue well enough without visual aids, as I am unable to take screenshots for others to see (sorry).

Thanks for your time!

dorrajmachai commented 1 year ago

@thesbx The issue was fixed a while ago. See this solution. I found it by going to /lua/alpha and looking to the right of the themes folder. Now it works! Hope you're able to get it functioning as well.

thesandybridge commented 1 year ago

@dorrajmachai yeah I saw that too, but it still doesn't work as expected for me.

dorrajmachai commented 1 year ago

@dorrajmachai yeah I saw that too, but it still doesn't work as expected for me.

Have you found a solution to this issue? It's been a while, but I can still see some errors that might result in the issue you're having. I am now using chris@machine's Neovim From Scratch config as a base config. It uses alpha, but I'm not having the issue with the directories anymore. If you're still having the issue, maybe you could try it and modify it to your liking?

goolord commented 1 year ago

what does "bookmark" mean here? autocd was implemented here https://github.com/goolord/alpha-nvim/pull/143#issue-1361277821, i personally do not use it. if your "bookmark" is a button that does :cd ~/foo <CR> then this should work just fine

thesandybridge commented 1 year ago

what does "bookmark" mean here? autocd was implemented here #143 (comment), i personally do not use it. if your "bookmark" is a button that does :cd ~/foo <CR> then this should work just fine

I am referring to choosing a recent file.

If I am at my root directory, and then open vim and choose a recent file it will take me to the file but it does not update the window to that file. So if I want to commit a change to git it won't work since I am not in a git repository, it says I am still in my root directory.

goolord commented 1 year ago

do you have autocd enabled? https://github.com/goolord/alpha-nvim/blob/main/doc/alpha.txt#L218