nvim-tree / nvim-tree/nvim-tree.lua
Multi Instance - Contributors Wanted - Please Take An Issue
Nobody has claimed this yet.
- 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.
- Refactor: move global state / singletons under the explorer.
- Build, experimental feature flag: discrete tree instances for each window.
- Consolidate: callbacks or state updates such as git, watchers, refresh should be applied to each instance.
- 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
- https://github.com/nvim-tree/nvim-tree.lua/issues/457
- https://github.com/nvim-tree/nvim-tree.lua/issues/1459
- https://github.com/nvim-tree/nvim-tree.lua/issues/1491
- https://github.com/nvim-tree/nvim-tree.lua/issues/1493
- https://github.com/nvim-tree/nvim-tree.lua/issues/1687
- https://github.com/nvim-tree/nvim-tree.lua/issues/1880
- https://github.com/nvim-tree/nvim-tree.lua/issues/1895
- https://github.com/nvim-tree/nvim-tree.lua/issues/1978
- https://github.com/nvim-tree/nvim-tree.lua/issues/2227
- https://github.com/nvim-tree/nvim-tree.lua/issues/2252
- https://github.com/nvim-tree/nvim-tree.lua/issues/2257
- https://github.com/nvim-tree/nvim-tree.lua/discussions/1847
- https://github.com/nvim-tree/nvim-tree.lua/discussions/1960
- https://github.com/nvim-tree/nvim-tree.lua/discussions/2244
- https://github.com/nvim-tree/nvim-tree.lua/discussions/2497
- https://github.com/nvim-tree/nvim-tree.lua/issues/2488
- https://github.com/nvim-tree/nvim-tree.lua/issues/2718
- https://github.com/nvim-tree/nvim-tree.lua/issues/2851
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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