diff options
| author | maxxnino <idonthaveemail@dontknow.com> | 2021-07-29 19:10:38 +0900 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-08-04 11:07:59 +0200 |
| commit | cb5059e68fa28f5fbeff6f15f472d9f6c4780e36 (patch) | |
| tree | d933e190597490f414c72611fd437655046ed947 /queries/zig | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar.gz nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar.bz2 nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar.lz nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar.xz nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.tar.zst nvim-treesitter-cb5059e68fa28f5fbeff6f15f472d9f6c4780e36.zip | |
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
Diffstat (limited to 'queries/zig')
| -rw-r--r-- | queries/zig/highlights.scm | 11 |
1 files changed, 9 insertions, 2 deletions
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" |
