Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: sessions dir is empty and nothing opened when :SessionLoad #59

Closed
4 tasks done
ruanyouxing opened this issue Mar 2, 2023 · 3 comments
Closed
4 tasks done
Assignees
Labels
bug Something isn't working

Comments

@ruanyouxing
Copy link

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

image

Reproduce the bug

  1. run :SessionSave
  2. Reopen neovim
  3. run :SessionLoad (or :SessionLoadLast)
  4. 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 using SessionLoad
  • I have made sure this is not a duplicate issue
@ruanyouxing ruanyouxing added the bug Something isn't working label Mar 2, 2023
@olimorris
Copy link
Owner

should_autosave should return a boolean

@ruanyouxing
Copy link
Author

Really? lol
Thanks a lot

@olimorris
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants