nvim-tree / nvim-tree/nvim-tree.lua

Change Root When Directory Is Inside Current Root

Open
#2,406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API feature request QOL
Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

There is no easy means to change the root on tree.open, tree.toggle, tree.find_file and update focused file when the directory is inside the root.

Add options or parameters to allow this behaviour.

Related: #2405

See https://github.com/nvim-tree/nvim-tree.lua/discussions/2062#discussion-4981774

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing tree.open, tree.toggle, and tree.find_file entry points, then read related issue #2405 and discussion #2062 for the intended behavior. Define options or parameters that permit changing the root when the target directory is already inside it and update the focused file; done means all three entry points support that behavior consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.