mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
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:
parent
bc5c5c0268
commit
cb5059e68f
1 changed files with 9 additions and 2 deletions
|
|
@ -27,13 +27,19 @@
|
||||||
|
|
||||||
(build_in_call_expr
|
(build_in_call_expr
|
||||||
function: ((identifier) @include
|
function: ((identifier) @include
|
||||||
(#eq? @include "@import"))
|
(#any-of? @include "@import" "@cImport"))
|
||||||
|
)
|
||||||
|
(struct_construction
|
||||||
|
(type_identifier) @constructor
|
||||||
)
|
)
|
||||||
|
|
||||||
;; other identifiers
|
;; other identifiers
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
(custom_number_type) @type.builtin
|
||||||
(primitive_type) @type.builtin
|
(primitive_type) @type.builtin
|
||||||
(field_identifier) @field
|
(field_identifier) @field
|
||||||
|
(enum_identifier) @constant
|
||||||
|
(union_identifier) @field
|
||||||
|
(error_identifier) @field
|
||||||
|
|
||||||
(line_comment) @comment
|
(line_comment) @comment
|
||||||
(doc_comment) @comment
|
(doc_comment) @comment
|
||||||
|
|
@ -121,6 +127,7 @@
|
||||||
"fn" @keyword.function
|
"fn" @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
|
(else_switch)
|
||||||
"continue"
|
"continue"
|
||||||
"else"
|
"else"
|
||||||
"if"
|
"if"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue