Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

languages: Change syntax highlighting for JSX elements (#49881)

finicobd6dadaa0b2e
diff --git a/crates/grammars/src/javascript/highlights.scm b/crates/grammars/src/javascript/highlights.scm
index 4af87cc578e..f6354dd3a01 100644
--- a/crates/grammars/src/javascript/highlights.scm
+++ b/crates/grammars/src/javascript/highlights.scm
@@ -328,26 +328,26 @@
; JSX elements
(jsx_opening_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_closing_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_self_closing_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_opening_element
diff --git a/crates/grammars/src/tsx/highlights.scm b/crates/grammars/src/tsx/highlights.scm
index 482bba7f081..0f203e7112c 100644
--- a/crates/grammars/src/tsx/highlights.scm
+++ b/crates/grammars/src/tsx/highlights.scm
@@ -389,26 +389,26 @@
(jsx_opening_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_closing_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_self_closing_element
[
- (identifier) @type
+ (identifier) @type @tag.component.jsx
(member_expression
- object: (identifier) @type
- property: (property_identifier) @type)
+ object: (identifier) @type @tag.component.jsx
+ property: (property_identifier) @type @tag.component.jsx)
])
(jsx_opening_element