Closed nwaywood closed 1 year ago
Can't reproduce it, check out your shiftwidth
, please.
@kevinhwang91 what does shiftwidth
need to be set to for the indent fallback to work? Maybe that should be added to the readme?
My shiftwidth
is set to 2
Maybe that should be added to the readme?
I don't think it's necessary for Vimer, without a correct shiftwidth
value, insert a newline is always buggy.
Does the correct shiftwidth
work for you?
@kevinhwang91 I don't think my shiftwidth
value is the issue. I had it set to 2 and it didn't work, I just tried shiftwidth=4
and the bug is present with both values.
Do you have any other ideas what the issue might be?
If I manually set foldmethod=indent
then indent based folding works
If it's relevant. I am experiencing this bug in a Scala file
Make sure that UfoInspect
output Selected provider: indent
.
Trim the issue file and post it here.
@kevinhwang91 oh wait maybe I misunderstood how the fallback works. I am in a file that has some treesitter folds but it isn't able to fold some sections of the file, I thought it is meant to fallback if there is a section of code that treesitter isn't able to fold. Is that not how it works? Does the fallback only work at the file level?
Does the fallback only work at the file level?
All providers work at the file level. If you want them to work together, you must write an external provider for provider_selector
, doc/example
may help you understand it.
Ah gotcha! Thanks for the help, sorry for my misunderstanding!
Neovim version (nvim -v | head -n1)
NVIM v0.8.0
Operating system/version
macOS 12.5
How to reproduce the issue
require("ufo").setup({ provider_selector = function(bufnr, filetype, buftype) return { "treesitter", "indent" } end, })