Shatur/neovim-session-manager

E5108: "Error executing lua" > E490: "no fold found" when loading a project

jeroenvermunt opened this issue · 8 comments

Bug description
When I open a my project located in ~/.config/nvim, I get an error. After the error, the open buffer of the project loads correctly, but it is located in the wrong working directory.

This error appears for every project, but other project DO load in the right directory. For some reason, it seems the working directory of this one project is corrupted, but I want to resolve the error first because I suspect it might resolve the issues

Steps to reproduce
Select any project project to open.

Expected behavior
The project to load in the right directory

Screenshots
image

Environment

  • OS: Ubuntu 22.4
  • Nvim: 0.9.5

You need to update to 0.10.

I'm getting this on nvim v0.11.0-dev-519+gd131c48c8-Homebrew as well @Shatur, any ideas as to why?

Not sure

I also get this issue on neovim 0.10.

Strange, I can't reproduce on my side.

It might be some race condition or weird interaction with the configuration of tree-sitter's foldexpr: https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#folding

Disabling these two lines from my configuration fixes the issue.

I will try this: neovim/neovim#28692 (comment) as soon as I fix other stuff...

For what it's worth @Shatur I was able to help at least avoid this issue by adding set sessionoptions-=folds to my config, this removes folds from being saved to sessions

Let's keep it open. I still unsure what causes it, but at least we have a workaround.