Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliably determine if nvim-tree is last window and exit gracefully #1466

Closed

Conversation

beauwilliams
Copy link

This is a PR aims to solve #1368 by parsing the window layout of the current window to reliably determine whether NvimTree if the last window and if so quits.

Also solving an apparent issue highlighted in snippet provided by readme this PR adds confirm quit so that we can also get a graceful exit in the case of unsaved buffers in the background.

I was sorely missing this feature when it was deprecated so I am hoping that this is good enough for it to be added back in :)

@kyazdani42
Copy link
Member

To be honest, we removed this because there were too many people asking for different implementations of this feature. We spent a lot of time answering these issues.
We don't want to maintain this, that's why we left it to the users. I believe a wiki page + a note in the readme would be good enough.

@beauwilliams
Copy link
Author

I totally understand, there were quite a few different ones flying around.

This solution should be quite a bit more robust in its approach compared to what was floating around, so at least the community can use it as they please

@kyazdani42
Copy link
Member

what i mean is that we won't merge that again, because even if it works better for some people, some other people will want different implementations.
You can write a new wiki page once you are done with the implementation :)

@beauwilliams
Copy link
Author

No problem :)

@alex-courtis
Copy link
Member

Wiki / readme: yes

nvim-tree functionality: no

This is hugely problematic due to:

  • unpredictable vim event ordering, especially factoring in nested autocommands
  • vim plugins / automation modifying buffers and windows during BufEnter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants