Open Zeioth opened 1 year ago
Yes, this is why I had to add conditions.
I'm gonna be experimenting changes, feel free to unsubscribe if get sick of getting many notifications 🫂
Said that: I'm reading buffers with buftype nofile
are excluded from mksession
. Assuming this is true, it might be possible to
mksession
.I'm gonna try.
My assumption was incorrect: This is a open bug in neovim from 2020. You were right, it doesn't seem neovim currently provide a way to do this. But I'll keep researching.
This is a thread to discuss possible ways to avoid doing this.
Failed approaches
Approach 1: Using
vim.o.sessionoptions
to exclude certain filetypesAs experiment, we have tried to remove
help
fromvim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,terminal,localoptions,winpos"
and then setting the
fitetype
andbuftype
of a file tohelp
, and save session.RESULT: Doesn't work, it still save the buffer. It seems
mksession
has a way to recognize help files other than its type.FUTURE ROADMAP
Once this neovim bug is fixed, we can temporaly set the buffers we don't want to save as
nofile
to exclude them frommksession
without having to close them.