folke / persistence.nvim

💾 Simple session management for Neovim
Apache License 2.0
655 stars 25 forks source link

Is it possible to close the current buffers before restoring the session? #52

Closed igrikus closed 3 months ago

igrikus commented 6 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

When I open the folder and restore the session, I am left with an empty buffer opened by default. This annoys me a bit. I would like to be able to close some (or all) of the current buffers

Describe the solution you'd like

We have a pre_save option, but maybe we can also have something like pre_open

Describe alternatives you've considered

I'm unfortunately still a nub in Neovim. Please don't throw stones if I can make something like this out of the box

Additional context

No response

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

folke commented 3 months ago

There's an event PersistenceLoadPre