Closed rodolfoksveiga closed 1 year ago
Can you supply the minimal.lua
file as per the bug report template? Impossible to try and recreate your issue without it
Closing for now
Copying the returned value from my persisted.lua
configuration would do it. But I already updated the issue.
Can you reopen it..?
What if you remove the keys
table?
@rodolfoksveiga any update on this?
Sorry for taking so long... I removed the keys
table but SessionSave
and SessionLoad
still don't work, even if I call these commands from cmd
(without key bindings).
Right, I amended your minimal.lua
config to work:
local root = "/tmp/persisted"
-- Set stdpaths to use root dir
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- Bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
vim.opt.sessionoptions = "buffers,curdir,folds,globals,tabpages,winpos,winsize" -- Session options to store in the session
-- Install plugins
local plugins = {
{
"olimorris/persisted.nvim",
opts = {
save_dir = "/tmp/persisted/sessions/",
silent = false,
use_git_branch = true,
branch_separator = "_",
autosave = false,
autoload = false,
},
},
-- Put any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
and isolated the issue. Thanks for spotting! That was a real edge case!
I have no idea how, but my configuration remains the same and the problem is solved. You probably have tackled it in a bug fix or so. Thanks anyway for your help. And congrats for developing such a useful plugin.
Persisted.nvim config
Error messages
There are no error messages.
Bug description
SessionSave
andSessionLoad
commands are currently not working.I followed your instructions with
minimal.lua
and tried to open some files, runSessionSave
, quit NVim and runSessionLoad
, but nothing is happens. I don't get errors or any message that could help me further.Could you help me with that.
How to reproduce the bug
minimal.lua
with my configuration dataminimal.lua
SessionSave
minimal.lua
SessionLoad
Final checks
minimal.lua
config file above and still get the issueSessionSave
to save the session before restarting Neovim and usingSessionLoad