diff --git a/crates/languages/src/javascript/highlights.scm b/crates/languages/src/javascript/highlights.scm index 9986390b4e4c717262f4c8f5729f0aafa82083cc..f46db408e7d73bb1aa714cf02176870f47d388de 100644 --- a/crates/languages/src/javascript/highlights.scm +++ b/crates/languages/src/javascript/highlights.scm @@ -25,6 +25,9 @@ name: (identifier) @function) (method_definition name: (property_identifier) @function.method) +(method_definition + name: (property_identifier) @constructor + (#eq? @constructor "constructor")) (pair key: (property_identifier) @function.method diff --git a/crates/languages/src/tsx/highlights.scm b/crates/languages/src/tsx/highlights.scm index d21f0c2147b33f4b291630e3a14f7660c2395b2d..5b83ec903c8d429eac872600247d75f58234598f 100644 --- a/crates/languages/src/tsx/highlights.scm +++ b/crates/languages/src/tsx/highlights.scm @@ -25,6 +25,9 @@ name: (identifier) @function) (method_definition name: (property_identifier) @function.method) +(method_definition + name: (property_identifier) @constructor + (#eq? @constructor "constructor")) (pair key: (property_identifier) @function.method @@ -45,9 +48,6 @@ ; Special identifiers -((identifier) @constructor - (#match? @constructor "^[A-Z]")) - ((identifier) @type (#match? @type "^[A-Z]")) (type_identifier) @type diff --git a/crates/languages/src/typescript/highlights.scm b/crates/languages/src/typescript/highlights.scm index bccb22fa9c743ec1a5269e6fb69bcc371b1c5cdc..502957c93bc565e3c7b06467996a374d513412a9 100644 --- a/crates/languages/src/typescript/highlights.scm +++ b/crates/languages/src/typescript/highlights.scm @@ -57,6 +57,9 @@ name: (identifier) @function) (method_definition name: (property_identifier) @function.method) +(method_definition + name: (property_identifier) @constructor + (#eq? @constructor "constructor")) (pair key: (property_identifier) @function.method