Nvim-tree.lua: Not changing root directory to the one that contains the .git

Created on 13 Mar 2021  路  5Comments  路  Source: kyazdani42/nvim-tree.lua

When opening a file from a git (ex. with startify) the explorer doesn't update its root directory to be the root of the project. Is there any way to achieve that?

Thank you for this great file explorer :)

enhancement

Most helpful comment

i'll work on a path handling rewrite soon, i'll try and use different plugins / options to make sure the algorithm works as expected for every situations.
In the meantime, please be patient :)

All 5 comments

thanks :)
Hum it should follow nvim's root cwd. What happens when you type :pwd ?

Happens for me too.

If you use :cd to set the cwd (confirmed with :pwd) and then open nvim-tree, it shows the whole home directory

Further, if you use <C-]> to set the cwd and then run something like :mksession! ~/.vim_session, restart nvim and source the session file, nvim-tree goes back to ~ even if you had explicitly set the working directory.

Using nvim nightly: v0.5.0-dev+950-g5ce328df4

indeed i did not subscribe to the DirChanged, this should be added as an option maybe

Having the same issue. When opening a file from startify, I expect to be dropped into the project root directory, not my home directory.

i'll work on a path handling rewrite soon, i'll try and use different plugins / options to make sure the algorithm works as expected for every situations.
In the meantime, please be patient :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kristijanhusak picture kristijanhusak  路  5Comments

gmr458 picture gmr458  路  6Comments

GustavoPrietoP picture GustavoPrietoP  路  6Comments

akinsho picture akinsho  路  9Comments

ecosse3 picture ecosse3  路  5Comments