Skip to content

Conversation

DinoChiesa
Copy link

For html-mode and html-ts-mode, without this change, treesit-fold folds from the END (closing angle bracket) of the opening element to the beginning (opening angle bracket) of the close element. That means attributes on the element are not included in the fold. Modern HTML can include lots of attributes.

Folding from the END of the opening element name to the END (closing angle bracket) of the closing element, will include attributes in the fold.

This change does that.

Before:
Screenshot 2025-07-08 6 27 16 PM

After:
Screenshot 2025-07-08 6 28 21 PM

For html-mode and html-ts-mode, without this change, treesit-fold folds from
the END (closing angle bracket) of the opening element to the beginning (opening
angle bracket) of the close element. That means attributes on the element are
not included in the fold. Modern HTML can include lots of attributes.

Folding from the END of the opening element name to the END (closing
angle bracket) of the closing element, will include attributes in the fold.

This change does that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant