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

Session Loading Issues

calebdw opened this issue · comments

Hello!

I ran a PackerSync and now or some reason I keep getting the below error when trying to reinstate a session:

[persisted.nvim]: Error loading the session! Vim(normal):E19: Mark has invalid line number

or sometimes I don't get the error but all I get are blank windows where my files used to be.

On further inspection, it also looks like a blank buffer is being added sometimes as well:
image

commented

Thanks for flagging! I think this was due to an update some commits ago. Can you check and see if the latest commit resolves this?

Unfortunately that did not seem to help...

commented

Can you run nvim --clean -u minimal.lua with this:

-- minimal.lua file

-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))

-- append test directory
local test_dir = "/tmp/persisted"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))

-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
    vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
    vim.cmd("packadd packer.nvim")
    install_plugins = true
end

local packer = require("packer")

packer.init({
    package_root = test_dir .. "/pack",
    compile_path = test_dir .. "/plugin/packer_compiled.lua",
})

packer.startup(function(use)
    -- Packer can manage itself
    use("wbthomason/packer.nvim")
    use({
      "nvim-telescope/telescope.nvim",
      requires = { 'nvim-lua/plenary.nvim' }
    })
    use("olimorris/persisted.nvim")

    if install_plugins then
        packer.sync()
    end
end)

local ok, persisted = pcall(require, "persisted")
if ok then
    persisted.setup()
    require("telescope").load_extension("persisted")
end

Hmm, I seem to get this error:
image

commented

Could you try pairing your config back to minimal plugins. I have no idea what's causing it as the error messages aren't detailed enough. It could be another plugin that got updated that is causing the issue

commented

Just googling this...I think it might be a weird Vim error. If you google "E19: Mark has invalid line number" there is some odd results.

Closing because it looks like a bug introduced in Neovim (I updated again and persisted seems to be working, although universal-tags and my lsp server keeps crashing....but that's another problem haha).

Thanks for your help!