zed/crates/grammars
Saketh 9a1b538fa0
Highlight nested JSX member expression tags (#53750)
The highlight queries only matched JSX member-expression tags when the
object was a plain identifier (`<A.B>`), so tags with more than one dot
like `<A.B.C>` lost their component-tag highlighting.

The fix explicitly captures every leaf `identifier` and
`property_identifier` at each nesting depth (up to 3 levels) in the
JavaScript and TSX highlight queries so each token gets its own
`@tag.component.jsx` capture that beats the generic `@property` rule.

A more concise approach, capturing the whole nested
`(member_expression)` node as a single `@tag.component.jsx` blob, does
not work because the generic `(property_identifier) @property` rule
targets a smaller, more specific node inside the blob, winning the
resolution for inner segments like `B` in `<A.B.C>`. 

Closes #53305 

Release Notes:

- Fixed highlighting for nested JSX member expression tags in JavaScript
and TSX files.

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-04-24 08:45:47 +00:00
..
src Highlight nested JSX member expression tags (#53750) 2026-04-24 08:45:47 +00:00
Cargo.toml Extract language_core and grammars crates from language (#52238) 2026-03-25 23:41:09 +00:00
LICENSE-GPL Extract language_core and grammars crates from language (#52238) 2026-03-25 23:41:09 +00:00