folke / persistence.nvim

💾 Simple session management for Neovim
Apache License 2.0
591 stars 26 forks source link

bug: #62

Closed jbrodriguez closed 2 weeks ago

jbrodriguez commented 2 weeks ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

macos 14.5

Describe the bug

not writing any files to ~/.local/state/nvim/sessions, since last update

Steps To Reproduce

update lazyvim and persistence to the latest versions

Expected Behavior

should stores some files in ~/.local/state/nvim/sessions, doesnt

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
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", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  { "folke/persistence.nvim", opts = {} },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
jbrodriguez commented 2 weeks ago

had to set branch = false, to make it work, it did write this file (in addition to the session for other folder)

<redacted>%.config%fish-fatal: not a git repository (or any of the parent directories): .git.vim'

on a not git folder