olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autosave not working

Chaitanyabsprip opened this issue · comments

I just installed the plugin and it seems like autosave is not working. If I am explicitly calling session save command and session load last command then it worked. but autosave not working

commented

The session is only written to disk when you leave Neovim and the VimLeavePre autocmd is triggered. If you haven't lazy loaded the plugin and autosave = true then the plugin creates the autocmd to save.

I have lazy loaded the plugin

So apparently it is auto-saving, just not auto-loading. Is that expected behavior?

commented

Yep that's right. You can use the SessionLoad command or could have an autocommand do it. It's a couple of lines of code to implement an auto-load so would be happy to do so if you wish to raise another issue.