Shatur / neovim-session-manager

A simple wrapper around :mksession.
GNU General Public License v3.0
530 stars 52 forks source link

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

Open jeroenvermunt opened 4 months ago

jeroenvermunt commented 4 months ago

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

Shatur commented 4 months ago

You need to update to 0.10.

avegancafe commented 3 months ago

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

Shatur commented 3 months ago

Not sure

viperML commented 3 months ago

I also get this issue on neovim 0.10.

Shatur commented 3 months ago

Strange, I can't reproduce on my side.

viperML commented 3 months ago

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: https://github.com/neovim/neovim/issues/28692#issuecomment-2105088651 as soon as I fix other stuff...

avegancafe commented 3 months ago

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

Shatur commented 3 months ago

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