From 46ecf825f0044e9006067fe014c010419b191911 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Sat, 22 Oct 2022 16:46:12 +0300 Subject: [PATCH] highlights(typescript): use more specific groups --- queries/typescript/highlights.scm | 42 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm index 3df859058..dba119a3b 100644 --- a/queries/typescript/highlights.scm +++ b/queries/typescript/highlights.scm @@ -1,24 +1,28 @@ ; inherits: ecma + [ -"abstract" -"declare" -"enum" -"export" -"implements" -"interface" -"keyof" -"namespace" -"private" -"protected" -"public" -"type" -"readonly" -"override" -"satisfies" + "declare" + "enum" + "export" + "implements" + "interface" + "keyof" + "type" + "namespace" + "override" + "satisfies" ] @keyword (as_expression "as" @keyword) +[ + "abstract" + "private" + "protected" + "public" + "readonly" +] @type.qualifier + ; types (type_identifier) @type @@ -33,10 +37,12 @@ ;; punctuation (type_arguments - "<" @punctuation.bracket - ">" @punctuation.bracket) + ["<" ">"] @punctuation.bracket) -(union_type +(type_parameters + ["<" ">"] @punctuation.bracket) + +(union_type "|" @punctuation.delimiter) (intersection_type