Closed ziontee113 closed 2 years ago
It should work as expected when folelevel
is small.
foldmethod=manual
should better set a large value for foldlevel
. I have no idea how to maintain a my_foldlevel
to make zm
and zr
work like small foldlevel
.
Oh thanks, I just copied the sample code that sets foldlevel=99
. Setting it to 1 solves the problem, I'll experiment with it further.
Actually setting foldlevel to 1 is stupid. I changed it back to 99 and use vim.o.foldlevelstart = 0
. Works fine for now :)
With a small foldlevel
, users should better call require('ufo').disableFold(bufnr)
and require('ufo').enableFold(bufnr)
by themselves.
I think having -1 foldlevelstart
screws up zm
and zr
for some reason. If I set it to -1 zm and zr just do absolutely nothing.
Neovim version (nvim -v | head -n1)
0.7
Operating system/version
Arch Linux
How to reproduce the issue
Pressing
zm
andzr
Expected behavior
Close / Open all folds by 1 level.
Actual behavior
Nothing happens.
Using
ufo
zR and zM works fine, but notzm
andzr
, they just do nothing.