Open shy-robin opened 1 month ago
marker
is a fallback provider with your config. For now, the ranges return from marker
provider are not merged with the main provider.
Will make it become default behavior after solving the performance issue for marker
.
timely - was just coming to ask about this - is #219 what I should be watching for updates?
Watching this issue is enough.
Neovim can't handle the cross ranges like:
local ranges = {
{
endLine = 5,
kind = "comment",
startLine = 3
}, {
endLine = 7,
kind = "marker",
startLine = 4
}
}
The two ranges are distorted and become [3,5] and [43,7]. You can enter visual selection mode and type zf
to create two folds manually to verify the issue. echo foldlevel('.')
may get the level under the cursor.
I have no idea how to solve this cross ranges issue. Users should decide which kind is a high priority range and discard the low priority by themselves.
Neovim version (nvim -v | head -n1)
0.10.0
Operating system/version
macOS 14.5
How to reproduce the issue
I can't use
za
to fold the range between// #region xxx
and// #endregion
markers. It will prompt the error:Cannot find fold
.https://github.com/user-attachments/assets/10abc167-fc9d-463b-8f46-180bb003de62
This is my lazyvim config:
Expected behavior
Fold the code between
#region
and#endregion
like vscode.Actual behavior
The code won't be folded and throw the error:
cannot find fold
.