From 0e6d4b4172f30c4aa44a9adc9ea5719723a1fac3 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Fri, 3 Feb 2023 10:42:12 +0200 Subject: [PATCH] highlights(ecma): limit constructor highlight --- queries/ecma/highlights.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm index 1de0de302..e347098a3 100644 --- a/queries/ecma/highlights.scm +++ b/queries/ecma/highlights.scm @@ -20,8 +20,8 @@ ; Special identifiers ;-------------------- -((identifier) @constructor - (#lua-match? @constructor "^[A-Z]")) +((identifier) @type + (#lua-match? @type "^[A-Z]")) ((identifier) @constant (#lua-match? @constant "^[A-Z_][A-Z%d_]+$")) @@ -89,6 +89,12 @@ function: (member_expression property: [(property_identifier) (private_property_identifier)] @method.call)) +; Constructor +;------------ + +(new_expression + constructor: (identifier) @constructor) + ; Variables ;---------- (namespace_import