Skip to content

update_focused_file doesn't focus file in another repo #2199

@ckt114

Description

@ckt114

Is this a question?
No

Can this functionality be implemented utilising API?
Not sure

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
With the settings update_focused_file = { enable = true, update_root = false } when I open a file in repo A the tree is focused on the folder where the file is located and the root folder is the repo's base, where .git folder is. This is working as expected. However, if I open another file in repo B, the tree doesn't update to repo B's base.

I tried setting update_focused_file.update_root = true and the tree does follows the file in repo B, however, the root folder is not repo B's base, but the folder deep inside where the file is located. I would like for nvim-tree to always make the repo's base the root folder, not the folder where the file is located as root.

Describe alternatives you've considered
I looked through the docs have not seen a option to achieve what I mentioned.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions