Closed ewok closed 1 year ago
yeah, I'm facing the same issue too. I hope we get a fix I love the plugin so much but I am unable to turn off autosaving. please help if there is a fix.
@ewok thanks for raising this.
To confirm my understanding is correct, you expect:
autosave = false
, Persisted should never save a session automaticallyautosave = true
should the plugin call the should_autosave
function and based on it boolean output, save the sessionThe above is what the plugin should do and appreciate at the minute it doesn't.
@olimorris Yes that's right. imho autosave = false
should completely turn off the autosaving, but it does't. Thank you!
This should be fixed in PR #56. Can you guys confirm?
EDIT: I've also allowed for :SessionSave
to override the autosave = false
config option. Thoughts being that you may wish to manually save the session
@olimorris confirming! Now works like a charm. Thank you so much 👍🏼
closing
Your Persisted.nvim config
Error messages
No response
Describe the bug
What I expect to happen
Not saved session
What actually happens
Session is saved
I did some small research. I guess it is related to the https://github.com/olimorris/persisted.nvim/blob/main/lua/persisted/init.lua#L148-L153 block.
Small test:
Reproduce the bug
Setup minimal.lua with my config.
1 Enter vim.
ls sessions/ | wc -l
Final checks
minimal.lua
config file above and still get the issueSessionSave
to save the session before restarting Neovim and usingSessionLoad