From 9cfb8afa9918c79904b5ec96b1c7e39a77387883 Mon Sep 17 00:00:00 2001 From: Mykyta <114003900+Nikita0x@users.noreply.github.com> Date: Mon, 7 Apr 2025 18:00:03 +0300 Subject: [PATCH] Added: missing highlighting to `queries/_typescript` (#13250) * Added: missing highlighting * moved: delete, typeof, instanceof, void - from keywords to keyword.operator --- runtime/queries/_typescript/highlights.scm | 12 ++++++++++++ runtime/queries/ecma/highlights.scm | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/runtime/queries/_typescript/highlights.scm b/runtime/queries/_typescript/highlights.scm index a5bfd9ed0..8ce9cb653 100644 --- a/runtime/queries/_typescript/highlights.scm +++ b/runtime/queries/_typescript/highlights.scm @@ -64,6 +64,10 @@ (array_pattern (identifier) @variable.parameter)) +(public_field_definition) @punctuation.special +(this_type) @variable.builtin +(type_predicate) @keyword.operator + ; Punctuation ; ----------- @@ -82,6 +86,7 @@ [ "abstract" "declare" + "module" "export" "infer" "implements" @@ -127,9 +132,16 @@ ">" ] @punctuation.bracket) +(omitting_type_annotation) @punctuation.special +(opting_type_annotation) @punctuation.special + ; Literals ; -------- [ (template_literal_type) ] @string + +(import_require_clause + (identifier) "=" + ("require") @keyword) diff --git a/runtime/queries/ecma/highlights.scm b/runtime/queries/ecma/highlights.scm index d56bbe14a..fcc47ce11 100644 --- a/runtime/queries/ecma/highlights.scm +++ b/runtime/queries/ecma/highlights.scm @@ -74,16 +74,12 @@ [ "async" "debugger" - "delete" "extends" "from" "get" "new" "set" "target" - "typeof" - "instanceof" - "void" "with" ] @keyword @@ -91,6 +87,10 @@ "of" "as" "in" + "delete" + "typeof" + "instanceof" + "void" ] @keyword.operator [