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

Can you provide a ignore list? #70

Closed
nyngwang opened this issue Dec 13, 2021 · 5 comments
Closed

Can you provide a ignore list? #70

nyngwang opened this issue Dec 13, 2021 · 5 comments

Comments

@nyngwang
Copy link

nyngwang commented Dec 13, 2021

As title. I'm using a neovim plugin called nvim-tree.lua and it seems that this plugin also records the file-tree into the session. When I restore the session with nvim -S the file-tree also opened as a buffer while I don't want this to happen. As shown below, the intro/ buffer should not appear:

@tpope
Copy link
Owner

tpope commented Dec 13, 2021

When I try it, nvim-tree buffers are given buftype=nofile, which causes Vim to skip recording them in the session. This is with a config of require('nvim-tree').setup(). I leave it to you to determine why your setup differs.

@tpope tpope closed this as completed Dec 13, 2021
@skwee357
Copy link

skwee357 commented Nov 3, 2022

Hey. Sorry for bringing this up again, but I have the same issue. Apparently, nvim-tree file type is NvimTree and not nofile hence it get's restored when I call nvim -S Session.vim. Appreciate some guidance if possible. Thanks!

@tpope
Copy link
Owner

tpope commented Nov 3, 2022

buftype, not filetype

@skwee357
Copy link

skwee357 commented Nov 4, 2022

Yes you are right, my bad. The buftype is indeed nofile, but even with the basic config of nvim-tree, it's still being monitored by the session

@tpope
Copy link
Owner

tpope commented Nov 4, 2022

:mksession skips nofile buffers unless 'sessionoptions' contains blank. And Obsession always removes blank from 'sessionoptions' before calling :mkession.

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

No branches or pull requests

3 participants