mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
languages: Exclude angle brackets from rainbow bracket colorization for Javascript (#57063)
## Summary Extends #51311 to JSX in JavaScript files, which uses the same javascript grammar for both .js and .jsx. ## Changes - Added (#set! rainbow.exclude) to the three angle bracket patterns in crates/grammars/src/javascript/brackets.scm, matching the TSX fix in #51311. ## 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. Release Notes: - Fixed angled brackets being included in rainbow bracket highlights for JavaScript.
This commit is contained in:
parent
342580531c
commit
ea01b926ea
1 changed files with 6 additions and 3 deletions
|
|
@ -7,14 +7,17 @@
|
||||||
("{" @open
|
("{" @open
|
||||||
"}" @close)
|
"}" @close)
|
||||||
|
|
||||||
("<" @open
|
(("<" @open
|
||||||
">" @close)
|
">" @close)
|
||||||
|
(#set! rainbow.exclude))
|
||||||
|
|
||||||
("<" @open
|
(("<" @open
|
||||||
"/>" @close)
|
"/>" @close)
|
||||||
|
(#set! rainbow.exclude))
|
||||||
|
|
||||||
("</" @open
|
(("</" @open
|
||||||
">" @close)
|
">" @close)
|
||||||
|
(#set! rainbow.exclude))
|
||||||
|
|
||||||
(("\"" @open
|
(("\"" @open
|
||||||
"\"" @close)
|
"\"" @close)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue