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
This commit is contained in:
maxxnino 2021-07-29 19:10:38 +09:00 committed by Thomas Vigouroux
parent bc5c5c0268
commit cb5059e68f

View file

@ -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"