|
1 |
| -; inherits: ecma |
2 |
| - |
3 | 1 | ; Highlight component names differently
|
4 | 2 | (jsx_opening_element ((identifier) @constructor
|
5 | 3 | (#match? @constructor "^[A-Z]")))
|
6 | 4 |
|
7 | 5 | ; Handle the dot operator effectively - <My.Component>
|
8 | 6 | (jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
|
9 | 7 |
|
| 8 | +; Highlight brackets differently |
| 9 | +(jsx_opening_element ["<" ">"] @punctuation.bracket) |
| 10 | + |
10 | 11 | (jsx_closing_element ((identifier) @constructor
|
11 | 12 | (#match? @constructor "^[A-Z]")))
|
12 | 13 |
|
13 | 14 | ; Handle the dot operator effectively - </My.Component>
|
14 | 15 | (jsx_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
|
15 | 16 |
|
| 17 | +; Highlight brackets differently |
| 18 | +(jsx_closing_element ["<" "/" ">"] @punctuation.bracket) |
| 19 | + |
16 | 20 | (jsx_self_closing_element ((identifier) @constructor
|
17 | 21 | (#match? @constructor "^[A-Z]")))
|
18 | 22 |
|
19 | 23 | ; Handle the dot operator effectively - <My.Component />
|
20 | 24 | (jsx_self_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
|
21 | 25 |
|
22 |
| -; TODO: also tag @punctuation.delimiter? |
| 26 | +; Highlight brackets differently |
| 27 | +(jsx_self_closing_element ["<" "/" ">"] @punctuation.bracket) |
| 28 | + |
| 29 | +; Handle attribute delimiter |
| 30 | +(jsx_attribute "=" @punctuation.delimiter) |
23 | 31 |
|
24 | 32 | (jsx_opening_element (identifier) @tag)
|
25 | 33 | (jsx_closing_element (identifier) @tag)
|
26 | 34 | (jsx_self_closing_element (identifier) @tag)
|
27 | 35 | (jsx_attribute (property_identifier) @variable.other.member)
|
| 36 | + |
| 37 | +; inherits: ecma |
0 commit comments