-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Unexpected behaviour when opening session with nvim-tree #50
Comments
Hey @brapifra I'm guessing this is because an nvim-tree buffer doesn't support being saved on a session, at least with your current sessionopts. I don't use nvim-tree so I wouldn't know much further than that. What I can tell you is that this plugin merely wraps That being said, what I've seen people do is use the session hooks to close any tree-like plugin's windows before saving the session so you at least don't see what you're currently seeing. I hope that helps at least a bit 😄 |
Thanks for the info @rmagatti! |
Hii @brapifra, I had the same issue which I solved through hooks and I will leave my config down here for you which would solve it hopefully. Adding the last 2 options (which are hooks) would take care of the issue.
|
Hey @sujaybokil use {
"rmagatti/auto-session",
config = function()
require("auto-session").setup {
pre_save_cmds = {"NvimTreeClose"}
}
end
} |
Closing since it looks like hooks cover the necessary cases. |
pre_save_cmds = {"NvimTreeClose"} Can open a new issue if needed. But this hook alone doesn't properly seem to close nvim-tree anymore. Can anyone else verify? |
I can confirm. |
Hey guys, so unless there's an issue with the hook itself, this is probably something on the nvim-tree side of things. Let me know if I can help with anything though! |
Works for me
|
Cannot confirm on nvim 0.5 |
Actually seems smth was updated, and today with newer neovim or plugins I fixed it to smth like
|
still no luck |
On neovim nightly.... This does not work:
This works:
"Works" means if I close neovim with a nvim-tree buffer open, when I reopen vim, that buffer is gone and not open |
Hey!
First of all, congrats on the plugin :)
Unfortunately, I encounter this
E95: Buffer with this name already exists
error when opening nvim after closing it withnvim-tree
open:Not sure if it's something that needs to be fixed on your end or on nvim-tree's end though. Let me know!
The text was updated successfully, but these errors were encountered: