From 1a767376cdb968f43af690ccac7001d2efbefb87 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Fri, 28 Oct 2022 16:57:38 +0300 Subject: highlights(zig): fix captures --- queries/zig/highlights.scm | 52 ++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/queries/zig/highlights.scm b/queries/zig/highlights.scm index 7767a3e5b..5115eb604 100644 --- a/queries/zig/highlights.scm +++ b/queries/zig/highlights.scm @@ -93,6 +93,13 @@ field_constant: (IDENTIFIER) @constant [ "allowzero" "volatile" + "threadlocal" + "inline" + "noinline" + "noalias" +] @type.qualifier + +[ "anytype" "anyframe" (BuildinTypeExpr) @@ -129,13 +136,28 @@ field_constant: (IDENTIFIER) @constant "orelse" ] @keyword.operator +[ + "packed" + "opaque" + "comptime" +] @storageclass + [ "struct" "enum" "union" "error" - "packed" - "opaque" + "defer" + "errdefer" + "async" + "nosuspend" + "await" + "suspend" + "resume" + "export" + "extern" + "asm" + "callconv" ] @keyword [ @@ -148,8 +170,6 @@ field_constant: (IDENTIFIER) @constant [ "const" "var" - "comptime" - "threadlocal" "fn" ] @keyword.function @@ -165,31 +185,9 @@ field_constant: (IDENTIFIER) @constant "continue" ] @keyword.return -; Macro -[ - "defer" - "errdefer" - "async" - "nosuspend" - "await" - "suspend" - "resume" - "export" - "extern" -] @function.macro - -; PrecProc -[ - "inline" - "noinline" - "asm" - "callconv" - "noalias" -] @attribute - [ "linksection" - "align" + "align" ] @function.builtin [ -- cgit v1.2.3-70-g09d2