Closed yads closed 1 year ago
NVIM v0.9.1
macOS 13.3.1
Using the following minimal configuration:
{ provider_selector = function(bufnr, filetype, buftype) return {'treesitter', 'indent'} end }
I'm seeing the following fold query for ruby get ignored in nvim-ufo, but it works without nvim-ufo (i.e. foldmethod=nvim_treesitter#foldexpr())
foldmethod=nvim_treesitter#foldexpr()
( (_) @_head . (comment) @_start . (comment)* . (comment) @_end . (_) @_tail (#not-has-type? @_head "comment") (#not-has-type? @_tail "comment") (#make-range! "fold" @_start @_end) )
The idea is to make a range called @fold out of a comment block of 2 or more consecutive comments.
@fold
ruby block:
# comment line 1 # comment line 2
Gets marked as a fold
Has no folds
Thanks for such a quick turnaround on this!
Neovim version (nvim -v | head -n1)
NVIM v0.9.1
Operating system/version
macOS 13.3.1
How to reproduce the issue
Using the following minimal configuration:
I'm seeing the following fold query for ruby get ignored in nvim-ufo, but it works without nvim-ufo (i.e.
foldmethod=nvim_treesitter#foldexpr()
)The idea is to make a range called
@fold
out of a comment block of 2 or more consecutive comments.Expected behavior
ruby block:
Gets marked as a fold
Actual behavior
ruby block:
Has no folds