mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
highlights(zig): label, switch item, operator, punctuation, field property (#1685)
Co-authored-by: maxxnino <idonthaveemail@dontknow.com>
This commit is contained in:
parent
03943f9a7c
commit
2dd36fa585
1 changed files with 26 additions and 8 deletions
|
|
@ -97,7 +97,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
("!")? @exception
|
("!")? @exception
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(ParamDecl
|
(ParamDecl
|
||||||
(ParamType (SuffixExpr (IDENTIFIER) @parameter))
|
(ParamType (SuffixExpr (IDENTIFIER) @parameter))
|
||||||
)
|
)
|
||||||
|
|
@ -111,12 +110,19 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(SwitchItem
|
||||||
|
(SuffixExpr
|
||||||
|
"."
|
||||||
|
.
|
||||||
|
(IDENTIFIER) @constant
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(BUILTINIDENTIFIER) @function.builtin
|
(BUILTINIDENTIFIER) @function.builtin
|
||||||
|
|
||||||
((BUILTINIDENTIFIER) @include
|
((BUILTINIDENTIFIER) @include
|
||||||
(#any-of? @include "@import" "@cImport"))
|
(#any-of? @include "@import" "@cImport"))
|
||||||
|
|
||||||
|
|
||||||
(INTEGER) @number
|
(INTEGER) @number
|
||||||
|
|
||||||
(FLOAT) @float
|
(FLOAT) @float
|
||||||
|
|
@ -136,10 +142,8 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
(BuildinTypeExpr)
|
(BuildinTypeExpr)
|
||||||
] @type.builtin
|
] @type.builtin
|
||||||
|
|
||||||
[
|
(BreakLabel (IDENTIFIER) @label)
|
||||||
(BreakLabel)
|
(BlockLabel (IDENTIFIER) @label)
|
||||||
(BlockLabel)
|
|
||||||
] @label
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"true"
|
"true"
|
||||||
|
|
@ -166,7 +170,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
[
|
[
|
||||||
"or"
|
"or"
|
||||||
"and"
|
"and"
|
||||||
(BitwiseOp "orelse")
|
"orelse"
|
||||||
] @keyword.operator
|
] @keyword.operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -220,7 +224,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
|
|
||||||
; PrecProc
|
; PrecProc
|
||||||
[
|
[
|
||||||
(BitwiseOp "orelse")
|
|
||||||
"inline"
|
"inline"
|
||||||
"noinline"
|
"noinline"
|
||||||
"asm"
|
"asm"
|
||||||
|
|
@ -240,6 +243,13 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
(AdditionOp)
|
(AdditionOp)
|
||||||
(MultiplyOp)
|
(MultiplyOp)
|
||||||
(PrefixOp)
|
(PrefixOp)
|
||||||
|
"*"
|
||||||
|
"**"
|
||||||
|
"->"
|
||||||
|
"=>"
|
||||||
|
".?"
|
||||||
|
".*"
|
||||||
|
"="
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -249,6 +259,11 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
":"
|
":"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
".."
|
||||||
|
"..."
|
||||||
|
] @punctuation.special
|
||||||
|
|
||||||
[
|
[
|
||||||
"["
|
"["
|
||||||
"]"
|
"]"
|
||||||
|
|
@ -256,4 +271,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
||||||
")"
|
")"
|
||||||
"{"
|
"{"
|
||||||
"}"
|
"}"
|
||||||
|
(Payload "|")
|
||||||
|
(PtrPayload "|")
|
||||||
|
(PtrIndexPayload "|")
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue