Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treesitter provider doesn't respect foldnestmax option #213

Open
net opened this issue Apr 15, 2024 · 0 comments
Open

Treesitter provider doesn't respect foldnestmax option #213

net opened this issue Apr 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@net
Copy link

net commented Apr 15, 2024

Feature description

With

vim.opt.foldnestmax = 1

the UFO Treesitter provider

provider_selector = function(bufnr, filetype, buftype)
  return { 'treesitter' }
end,

does not respect foldnestmax, while disabling UFO providers and using

provider_selector = function(bufnr, filetype, buftype)
  return ''
end,

...

vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'

does.

See: https://neovim.io/doc/user/options.html#'foldnestmax'

Describe the solution you'd like

The UFO Treesitter provider should respect foldnestmax.

Additional context

No response

@net net added the enhancement New feature or request label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant