Skip to content

html: Exclude all brackets from bracket colorization#46808

Merged
MrSubidubi merged 1 commit intomainfrom
less-html-rainbow
Jan 14, 2026
Merged

html: Exclude all brackets from bracket colorization#46808
MrSubidubi merged 1 commit intomainfrom
less-html-rainbow

Conversation

@MrSubidubi
Copy link
Copy Markdown
Member

Closes #45755

Rainbow brackets in HTML files do not really make sense - a tag is always enclosed in angled brackets. With our current approach, that means that we will highlight all brackets in HTML files with the same color, because well, these angled brackets do not quite behave like in other languages.

Hence, let themes color this again and just exluce HTML angled brackets from rainbow bracket colorization, as it is no real rainbow bracket colorization anyway.

Release Notes:

  • N/A

@MrSubidubi MrSubidubi self-assigned this Jan 14, 2026
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 14, 2026
@MrSubidubi MrSubidubi merged commit 993bbf5 into main Jan 14, 2026
25 checks passed
@MrSubidubi MrSubidubi deleted the less-html-rainbow branch January 14, 2026 17:06
rtfeldman pushed a commit that referenced this pull request Jan 14, 2026
Closes #45755

Rainbow brackets in HTML files do not really make sense - a tag is
always enclosed in angled brackets. With our current approach, that
means that we will highlight all brackets in HTML files with the same
color, because well, these angled brackets do not quite behave like in
other languages.

Hence, let themes color this again and just exluce HTML angled brackets
from rainbow bracket colorization, as it is no real rainbow bracket
colorization anyway.

Release Notes:

- N/A
MrSubidubi pushed a commit that referenced this pull request Mar 11, 2026
…or TSX (#51311)

## Summary

Angle brackets in TSX (`<`, `>`, `/>`, `</`) are always paired with JSX
tag syntax — they don't indicate bracket nesting depth — so rainbow
colorization adds noise without useful information.

This mirrors #46808, which applied the same fix to the HTML extension.

## Changes

- Added `(#set! rainbow.exclude)` to all three angle bracket patterns in
`crates/languages/src/tsx/brackets.scm`

## Before / After

Before: angle brackets in JSX tags receive rainbow colors alongside
`{}`, `()`, `[]`, making every tag visually noisy.

After: only `{}`, `()`, and `[]` receive rainbow colors — angle brackets
are excluded, matching the HTML extension behavior.

> Screenshots: I don't have a built copy of Zed handy to attach — happy
to add one if a maintainer needs it before merging.

Release Notes:

- Removed rainbow bracket colorization for angled brackets within TSX.
tommyming pushed a commit to tommyming/zed that referenced this pull request Mar 13, 2026
…or TSX (zed-industries#51311)

## Summary

Angle brackets in TSX (`<`, `>`, `/>`, `</`) are always paired with JSX
tag syntax — they don't indicate bracket nesting depth — so rainbow
colorization adds noise without useful information.

This mirrors zed-industries#46808, which applied the same fix to the HTML extension.

## Changes

- Added `(#set! rainbow.exclude)` to all three angle bracket patterns in
`crates/languages/src/tsx/brackets.scm`

## Before / After

Before: angle brackets in JSX tags receive rainbow colors alongside
`{}`, `()`, `[]`, making every tag visually noisy.

After: only `{}`, `()`, and `[]` receive rainbow colors — angle brackets
are excluded, matching the HTML extension behavior.

> Screenshots: I don't have a built copy of Zed handy to attach — happy
to add one if a maintainer needs it before merging.

Release Notes:

- Removed rainbow bracket colorization for angled brackets within TSX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

punctuation.bracket.htmldoesn't have an effect

2 participants