nvim-tree / nvim-tree/nvim-tree.lua
Don't Close Window On fs.remove() When Last Buffer In Window
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 8.6k
- Forks
- 639
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
Problem
When there's just 1 window opened along with nvimtree, then deleting its file from tree, would make nvimtree become fullscreen
Desired behavior
Nvimtree should open unamed buf ( enew ) and then delete, this will maintain the win layout!
actions = {
remove_file = {
open_unamed_buf = true,
},
},
Possible solutions with edgecases
The code must be run only when the user presses "y"
Case 1
If there's just 1 listed buffer and its the active window
- Add empty buffer i.e enew
- delete
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
Reproduce the one-window case in nvim-tree and trace the fs.remove action reached when the user presses "y". Check the behavior when the last listed buffer is active, then verify that the window layout is preserved and the file is still deleted after handling the unnamed buffer case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100