New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folds are calculated before the tree-sitter tree is updated #25822
Comments
Only when using Edit: I was wrong. |
This might have been fixed by recent fixes in |
I can confirm I'm still having this issue with EDIT: actually, I'm having a similar issue: given a closed fold, if I use |
Hey, thanks for the quick fix! I thought about reporting it, but I suspected it was just a side effect of this issue! |
Problem
Same as #14977.
If using treesitter as fold provider, foldcolumn can be out of sync after the buffer is changed.
Steps to reproduce
Create the
minimal.lua
init file:Create the following json file
test.json
for testing:nvim --clean -u minimal.lua test.json
zjzj
to jump to the first line of the second foldO
to insert a line aboveObserve that the foldcolumn is out of sync
Screenshots:
Step 3:
Step 4:
Step 5 (observe that foldcolumn not updated in time):
Expected behavior
Foldcolumn should always be in sync.
Foldcolumn should be re-calculated after treesitter updates folds.
Neovim version (nvim -v)
NVIM v0.10.0-dev-1427+gac353e87aec
Vim (not Nvim) behaves the same?
no, vim does not have treesitter
Operating system/version
Linux 6.1.60-1-lts
Terminal name/version
alacritty 0.12.3 (5efb0690) + tmux 3.3a
$TERM environment variable
tmux-256color
Installation
AUR
The text was updated successfully, but these errors were encountered: