Skip to content

Commit

Permalink
Update zig tree-sitter (helix-editor#1501)
Browse files Browse the repository at this point in the history
use latest upstream version
move comptime from @keyword.function to @keyword.directive
use AssignOp
enhance indents
  • Loading branch information
voroskoi authored Jan 14, 2022
1 parent ac6b2de commit 6bfd001
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helix-syntax/languages/tree-sitter-zig
5 changes: 2 additions & 3 deletions runtime/queries/zig/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ field_constant: (IDENTIFIER) @constant

; VarDecl
[
"comptime"
"threadlocal"
"fn"
] @keyword.function
Expand Down Expand Up @@ -178,6 +177,7 @@ field_constant: (IDENTIFIER) @constant

; PrecProc
[
"comptime"
"inline"
"noinline"
"asm"
Expand All @@ -195,15 +195,14 @@ field_constant: (IDENTIFIER) @constant
(BitwiseOp)
(BitShiftOp)
(AdditionOp)
(AssignOp)
(MultiplyOp)
(PrefixOp)
"*"
"**"
"->"
"=>"
".?"
".*"
"="
"?"
] @operator

Expand Down
3 changes: 3 additions & 0 deletions runtime/queries/zig/indents.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ indent = [
"BlockExpr",
"ContainerDecl",
"SwitchExpr",
"AssignExpr",
"ErrorUnionExpr",
"Statement",
"InitList"
]

Expand Down

0 comments on commit 6bfd001

Please sign in to comment.