nvim-ufo icon indicating copy to clipboard operation
nvim-ufo copied to clipboard

feat(provider): marker provider

Open LucasAVasco opened this issue 9 months ago • 0 comments

Add a provider that can fold generic markers. The default ones are:

  • '{{{' and '}}}' from vim

  • '#region' and '#endregion' from VS Code

You can change the markers with the global variable: vim.g.ufo_markers. This provider does not use the 'foldmarker' option because it is limited to only one marker pattern

By default, the provider only tracks markers inside comments to prevent accidental folding. You can enable the folding to markers outside of comments setting the global variable vim.g.ufo_markers_only_comment to false

All folds queried from this provider will have the 'kind' attribute equal to 'ufo_marker'

LucasAVasco avatar May 09 '24 01:05 LucasAVasco