From f0e91fd9b9dcf111dee299b3f91366585b30d2a9 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Tue, 23 Apr 2024 20:29:59 -0700 Subject: feat(qml): add back `ecma` inheritance Fixed after the grammar dependencies were updated. This time inheritance is given to the injections queries also. --- queries/qmljs/highlights.scm | 43 ++++--------------------------------------- queries/qmljs/injections.scm | 1 + 2 files changed, 5 insertions(+), 39 deletions(-) create mode 100644 queries/qmljs/injections.scm (limited to 'queries') diff --git a/queries/qmljs/highlights.scm b/queries/qmljs/highlights.scm index d543074be..cef6639de 100644 --- a/queries/qmljs/highlights.scm +++ b/queries/qmljs/highlights.scm @@ -1,4 +1,5 @@ -; temporarily removed the ecma inherit due to it breaking +; inherits: ecma + "pragma" @keyword.import ; Annotations @@ -67,40 +68,6 @@ (nested_identifier (identifier) @module)) -; Properties -;----------- -(property_identifier) @property - -; function -(call_expression - function: (member_expression - object: (identifier) @variable - property: (property_identifier) @function)) - -; js -; Literals -;--------- -[ - (true) - (false) -] @boolean - -[ - (null) - (undefined) -] @constant.builtin - -(comment) @comment @spell - -[ - (string) - (template_string) -] @string - -(regex) @string.regexp - -(number) @number - ; Tokens ;------- [ @@ -118,9 +85,6 @@ (predefined_type) @type.builtin -((identifier) @type - (#lua-match? @type "^%u")) - (type_arguments "<" @punctuation.bracket ">" @punctuation.bracket) @@ -142,8 +106,9 @@ "export" "implements" "interface" - "keyof" "namespace" "type" "override" ] @keyword + +"keyof" @keyword.operator diff --git a/queries/qmljs/injections.scm b/queries/qmljs/injections.scm new file mode 100644 index 000000000..04328f099 --- /dev/null +++ b/queries/qmljs/injections.scm @@ -0,0 +1 @@ +; inherits: ecma -- cgit v1.2.3-70-g09d2