From d5116feefd19f81a6b35be732732c98ce7e8352a Mon Sep 17 00:00:00 2001 From: maxxnino Date: Wed, 4 Aug 2021 17:20:00 +0900 Subject: highlights(zig): function return type, var decl type --- queries/zig/highlights.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/queries/zig/highlights.scm b/queries/zig/highlights.scm index 9c0a095b..6f0c0a84 100644 --- a/queries/zig/highlights.scm +++ b/queries/zig/highlights.scm @@ -15,7 +15,8 @@ name: (identifier) @function) (function_declaration - name: (identifier) @function) + name: (identifier) @function + return: (identifier) @type) ; Function calls (call_expression @@ -29,9 +30,11 @@ function: ((identifier) @include (#any-of? @include "@import" "@cImport")) ) + (struct_construction (type_identifier) @constructor ) + ;; other identifiers (type_identifier) @type (custom_number_type) @type.builtin @@ -41,6 +44,16 @@ (union_identifier) @field (error_identifier) @field +(assignment_statement + name: (identifier) @type + expression: [ + (enum_expression) + (union_expression) + (error_expression) + (struct_expression) + ] +) + (line_comment) @comment (doc_comment) @comment -- cgit v1.2.3