[Bug]: sessions dir is empty and nothing opened when :SessionLoad
ruanyouxing opened this issue · 3 comments
ruanyouxing commented
Your Persisted.nvim config
require('persisted').setup {
save_dir = vim.fn.expand(vim.fn.stdpath 'data' .. '/sessions/'),
autosave = true,
should_autosave = function()
vim.notify 'Session saved'
end,
telescope = {
reset_prompt_after_deletion = true,
},
}
Error messages
No response
Describe the bug
What I expected to be happended
It will pump up my saved session when I use :SessionLoad or :SessionLoadLast or :Telescope persisted
What actually happended
Nothing, I checked the session directory and it's completely empty
Reproduce the bug
- run :SessionSave
- Reopen neovim
- run :SessionLoad (or :SessionLoadLast)
- nothing opened
Final checks
- I have made sure this issue exists in the latest version of the plugin
- I have tested with the
minimal.lua
config file above and still get the issue - I have used
SessionSave
to save the session before restarting Neovim and usingSessionLoad
- I have made sure this is not a duplicate issue
olimorris commented
should_autosave
should return a boolean
ruanyouxing commented
Really? lol
Thanks a lot
olimorris commented
@ruanyouxing the example in the readme gives a clear example.
If you wish to do any notifying after the session loads I'd recommend the callbacks section.