Closed brokencode64 closed 10 months ago
Maybe the kind
field doesn't include imports
for your language server (use UFO_LOG=info nvim
, tail -f ~/.cache/nvim/ufo.log
to double check`). So it cannot be folded automatically by default due to no support by LSP itself. Instead, you may define your own provider to include the range of code you want to fold. I think this (https://github.com/kevinhwang91/nvim-ufo/issues/125) may be a good reference for you.
Sorry can I disable https://github.com/kevinhwang91/nvim-ufo/issues/64 on start? I check https://github.com/kevinhwang91/nvim-ufo/issues/136 but have no idea
@fecet Disable what? Disable "automatically fold the imports"? If so, remove imports
from close_fold_kinds
in your ufo config.
Thanks! Sorry for not reading doc carefully
stale
Neovim version
Nvim v0.9.1
Operating system/version
Arch Linux - Kernel 6.4.1
How to reproduce the issue
Ufo plugin installation:
Ufo configuration:
Lsp client setup:
Neovim fold options (I have tried different settings here):
Running
Lspinfo
confirms pylsp is connected.Running
UfoInspect
shows this:Expected behavior
Import lines should be foldable in python files.
Actual behavior
Trying to fold imports results in "no fold found" when editing python files.
Everything else will fold.
Imports do work for typescript.