anuvyklack / pretty-fold.nvim

Foldtext customization in Neovim
Apache License 2.0
441 stars 21 forks source link

Better matchup experience #23

Closed ofseed closed 2 years ago

ofseed commented 2 years ago

Could it possible to fold HTML tag

<div>
  HTML tag
</div>

Like this:

<div>...</div>

Maybe correctly defined matchup patterns could do it, but I don't know how to.

ofseed commented 2 years ago

Does it seem that the last element of the table which passed to the matchup_patterns is hardcoded to display? image

image

anuvyklack commented 2 years ago

Yes, the matchup_patterns is hardcoded. The treesitter is responding for the region to fold. You can to tune what to fold in treesitter/queries/html/folds.scm file.