Skip to content

languages: Exclude angle brackets from rainbow bracket colorization for TSX#51311

Merged
MrSubidubi merged 1 commit intozed-industries:mainfrom
jackkkonggg:fix/tsx-angle-bracket-rainbow-exclude
Mar 11, 2026
Merged

languages: Exclude angle brackets from rainbow bracket colorization for TSX#51311
MrSubidubi merged 1 commit intozed-industries:mainfrom
jackkkonggg:fix/tsx-angle-bracket-rainbow-exclude

Conversation

@jackkkonggg
Copy link
Copy Markdown
Contributor

@jackkkonggg jackkkonggg commented Mar 11, 2026

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.

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 11, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @jackkkonggg on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 11, 2026
@maxdeviant maxdeviant changed the title tsx: exclude angle brackets from rainbow bracket colorization tsx: Exclude angle brackets from rainbow bracket colorization Mar 11, 2026
@MrSubidubi MrSubidubi changed the title tsx: Exclude angle brackets from rainbow bracket colorization languages: Exclude angle brackets from rainbow bracket colorization for TSX Mar 11, 2026
Copy link
Copy Markdown
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, very valid. Thank you!

@MrSubidubi
Copy link
Copy Markdown
Member

Will need you to sign the CLA though

@MrSubidubi MrSubidubi self-assigned this Mar 11, 2026
@jackkkonggg
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 11, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Mar 11, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks! And congratulations to your first contribution! 🎉

@MrSubidubi MrSubidubi enabled auto-merge (squash) March 11, 2026 17:40
@jackkkonggg
Copy link
Copy Markdown
Contributor Author

Perfect, thanks! And congratulations to your first contribution! 🎉

My first OSS contribution! Looking forward to doing more.

@MrSubidubi MrSubidubi merged commit 4507210 into zed-industries:main Mar 11, 2026
42 checks passed
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 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants