Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add `constructor` highlighting for JS/TS/TSX (#25207)
Devzethe00d737196f7
diff --git a/crates/languages/src/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scmindex 9986390b4e4..f46db408e7d 100644--- a/crates/languages/src/javascript/highlights.scm+++ b/crates/languages/src/javascript/highlights.scm@@ -25,6 +25,9 @@name: (identifier) @function)(method_definitionname: (property_identifier) @function.method)+(method_definition+ name: (property_identifier) @constructor+ (#eq? @constructor "constructor"))(pairkey: (property_identifier) @function.methoddiff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scmindex d21f0c2147b..5b83ec903c8 100644--- a/crates/languages/src/tsx/highlights.scm+++ b/crates/languages/src/tsx/highlights.scm@@ -25,6 +25,9 @@name: (identifier) @function)(method_definitionname: (property_identifier) @function.method)+(method_definition+ name: (property_identifier) @constructor+ (#eq? @constructor "constructor"))(pairkey: (property_identifier) @function.method@@ -45,9 +48,6 @@; Special identifiers-((identifier) @constructor- (#match? @constructor "^[A-Z]"))-((identifier) @type(#match? @type "^[A-Z]"))(type_identifier) @typediff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scmindex bccb22fa9c7..502957c93bc 100644--- a/crates/languages/src/typescript/highlights.scm+++ b/crates/languages/src/typescript/highlights.scm@@ -57,6 +57,9 @@name: (identifier) @function)(method_definitionname: (property_identifier) @function.method)+(method_definition+ name: (property_identifier) @constructor+ (#eq? @constructor "constructor"))(pairkey: (property_identifier) @function.method