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

Multi Instance - Contributors Wanted - Please Take An Issue

Open
#2,255 4 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Project Board

Any and all contributions are most gratefully appreciated.

Please comment on or assign yourself an issue if you're working on it.

Update 2025-08-10: project is at an impass due to difficult View refactoring. Project is on hold until an alternative direction can be found.

Current State

nvim-tree allows and supports exactly one window per tab, however there is some shared state between windows.

Problems

  • Multiple windows may be opened in one tab via split, however this is not functional
  • Windows across tabs are somewhat discrete in that they have their own buffer, however some state is shared e.g. opened folders and bleeds across tabs

Desired Outcome

  • Discrete nvim-tree windows, with their own state that does not affect others.
  • Single shared nvim-tree windows across tabs, with identical / mirrored state. This is similar to the tree of some IDEs.

Implementation Notes

  • Single instance would use the one buffer and state. This would result in the tree being closed across tabs.
  • Discrete instances would require the global state to be stored per-instance.
  • Global states such as filesystem and git would need to be shared, with single global watchers / background tasks.

Limitations

  • This will likely need to be a binary option. Providing a means to manage discrete and shared instances would be (impossibly?) problematic from a UX perspective.
  • Floating tree windows are closed when they lose focus, including when swapping tabs. Floating would continue to be restricted to a single ephemeral instance.

Implementation Plan

An incremental approach is more practical, with a feature branch likely interrupting development due to its cross-cutting nature.

  1. Refactor: move global state / singletons under the explorer.
  2. Build, experimental feature flag: discrete tree instances for each window.
  3. Consolidate: callbacks or state updates such as git, watchers, refresh should be applied to each instance.
  4. Release 2.0.0: following experiment testing, release with the discrete option turned ON by default, as that is closest to current behaviour.

It's not clear yet whether 2 and 3 would be implemented at the same time or sequentially. Simplest/safest implementation can be determined once work begins on 2.

References

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 implementation plan in this issue and review the linked issues and discussions, since no specific file, test, or entry point is named. The work is currently on hold because of difficult View refactoring. Done would require discrete or shared nvim-tree instances with isolated or mirrored state, plus shared filesystem and git activity as appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.