From 1231429028c0ea5de3254b3bd959cb1ca93a199a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Mon, 20 May 2024 19:48:25 +0900 Subject: [PATCH] queries: Update cue --- runtime/queries/cue/highlights.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/runtime/queries/cue/highlights.scm b/runtime/queries/cue/highlights.scm index aef016e8b..52523b210 100644 --- a/runtime/queries/cue/highlights.scm +++ b/runtime/queries/cue/highlights.scm @@ -1,6 +1,6 @@ (package_clause "package" @keyword.control.import) -(package_identifier) @variable +(package_identifier) @namespace (import_declaration "import" @keyword.control.import) @@ -25,7 +25,7 @@ "/" ] @operator -(unary_expression "*" @operator.default) +(unary_expression "*" @operator) (unary_expression "=~" @operator.regexp) @@ -95,16 +95,24 @@ (interpolation "\\(" @punctuation.bracket (_) ")" @punctuation.bracket) @variable.other.member -(field (label (identifier) @variable.other.member)) +(identifier) @variable + +; Types +(primitive_type) @type.builtin ( (identifier) @keyword.storage.type (#match? @keyword.storage.type "^#") ) -(field (label alias: (identifier) @label)) +[ + (slice_type) + (pointer_type) +] @type ; In attributes -(let_clause left: (identifier) @label) +(field (label (identifier) @variable.other.member)) + +(field (label alias: (identifier) @label)) -(attribute (identifier) @tag) +(attribute (identifier) @attribute)