- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 632
Description
Is this a question?
No
Can this functionality be implemented utilising API?
No
Is your feature request related to a problem? Please describe.
I like to use the project tree explorer as a split window rather than a project drawer so I use nvim-tree configured like vinegar.
The issue I have is its buffer resists being replaced, forcing me every time to close it manually.
That happens for example trying to open a location from the quickfix list and nvim-tree is the only other buffer displayed in a window
Describe the solution you'd like
It would be nice to have a configuration option which could make it possible to turn off the default behaviour (resisting to buffer replacements).
Describe alternatives you've considered
None yet
Additional context
I could attempt a PR if needed
Activity
alex-courtis commentedon Dec 18, 2022
That is useful. It would replace the second part of the vinegar recipe and be more consistent for all operations.
We'll need an appropriate name for the option. Perhaps at the top level.
Your contribution would be gratefully appreciated: CONTRIBUTING.md
Tolomeo commentedon Dec 23, 2022
By investigating the possible implementation I noticed that it is not nvim-tree resisting being replaced, it is instead vim which prefers to open a new window instead of replacing the tree buffer.
I couldn't find explicit documentation of the exact behaviour. It should be controlled by the global
switchbuf
but there seems to be exceptions as the same happens with windows hosting terminal buffers.It is not an issue related to nvim-tree then, the plugin is working as expected.
steliyan commentedon May 12, 2023
@Tolomeo have you figured out a way? I've created a discussion: #2206
Tolomeo commentedon May 15, 2023
Hey @steliyan, unfortunately not.