From cb5059e68fa28f5fbeff6f15f472d9f6c4780e36 Mon Sep 17 00:00:00 2001 From: maxxnino Date: Thu, 29 Jul 2021 19:10:38 +0900 Subject: highlights(zig): highlight enum,union,error and custom number type * highlight enum field as a constant * highlight cImport and constructor * highlight else_switch enum constant --- queries/zig/highlights.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'queries/zig') diff --git a/queries/zig/highlights.scm b/queries/zig/highlights.scm index 4ced636d3..9c0a095b0 100644 --- a/queries/zig/highlights.scm +++ b/queries/zig/highlights.scm @@ -27,13 +27,19 @@ (build_in_call_expr function: ((identifier) @include - (#eq? @include "@import")) + (#any-of? @include "@import" "@cImport")) +) +(struct_construction + (type_identifier) @constructor ) - ;; other identifiers (type_identifier) @type +(custom_number_type) @type.builtin (primitive_type) @type.builtin (field_identifier) @field +(enum_identifier) @constant +(union_identifier) @field +(error_identifier) @field (line_comment) @comment (doc_comment) @comment @@ -121,6 +127,7 @@ "fn" @keyword.function [ + (else_switch) "continue" "else" "if" -- cgit v1.2.3-70-g09d2