aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/zig/textobjects.scm
blob: 67528943c9d75cc1c7e7903947c6643bb7f2d549 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(TopLevelDecl (FnProto)
  (_) @function.inside) @function.around

(TestDecl (_) @test.inside) @test.around

; matches all of: struct, enum, union
; this unfortunately cannot be split up because
; of the way struct "container" types are defined
(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl
    (_) @class.inside))))) @class.around

(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl
    (_) @class.inside))))) @class.around

(ParamDeclList
  ((_) @parameter.inside . ","? @parameter.around) @parameter.around)

[
  (doc_comment)
  (line_comment)
] @comment.inside
(line_comment)+ @comment.around
(doc_comment)+ @comment.around