mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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
|
||||
)
|
||||
|
||||
|
||||
(ParamDecl
|
||||
(ParamType (SuffixExpr (IDENTIFIER) @parameter))
|
||||
)
|
||||
|
|
@ -111,12 +110,19 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
]
|
||||
)
|
||||
|
||||
(SwitchItem
|
||||
(SuffixExpr
|
||||
"."
|
||||
.
|
||||
(IDENTIFIER) @constant
|
||||
)
|
||||
)
|
||||
|
||||
(BUILTINIDENTIFIER) @function.builtin
|
||||
|
||||
((BUILTINIDENTIFIER) @include
|
||||
(#any-of? @include "@import" "@cImport"))
|
||||
|
||||
|
||||
(INTEGER) @number
|
||||
|
||||
(FLOAT) @float
|
||||
|
|
@ -136,10 +142,8 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
(BuildinTypeExpr)
|
||||
] @type.builtin
|
||||
|
||||
[
|
||||
(BreakLabel)
|
||||
(BlockLabel)
|
||||
] @label
|
||||
(BreakLabel (IDENTIFIER) @label)
|
||||
(BlockLabel (IDENTIFIER) @label)
|
||||
|
||||
[
|
||||
"true"
|
||||
|
|
@ -166,7 +170,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
[
|
||||
"or"
|
||||
"and"
|
||||
(BitwiseOp "orelse")
|
||||
"orelse"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
|
|
@ -220,7 +224,6 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
|
||||
; PrecProc
|
||||
[
|
||||
(BitwiseOp "orelse")
|
||||
"inline"
|
||||
"noinline"
|
||||
"asm"
|
||||
|
|
@ -240,6 +243,13 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
(AdditionOp)
|
||||
(MultiplyOp)
|
||||
(PrefixOp)
|
||||
"*"
|
||||
"**"
|
||||
"->"
|
||||
"=>"
|
||||
".?"
|
||||
".*"
|
||||
"="
|
||||
] @operator
|
||||
|
||||
[
|
||||
|
|
@ -249,6 +259,11 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
".."
|
||||
"..."
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
|
|
@ -256,4 +271,7 @@ constructor: (SuffixExpr (IDENTIFIER) @constructor)
|
|||
")"
|
||||
"{"
|
||||
"}"
|
||||
(Payload "|")
|
||||
(PtrPayload "|")
|
||||
(PtrIndexPayload "|")
|
||||
] @punctuation.bracket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue