Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/zig/textobjects.scm')
| -rw-r--r-- | runtime/queries/zig/textobjects.scm | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/runtime/queries/zig/textobjects.scm b/runtime/queries/zig/textobjects.scm index 5c4ebd86..243d1294 100644 --- a/runtime/queries/zig/textobjects.scm +++ b/runtime/queries/zig/textobjects.scm @@ -1,23 +1,22 @@ -(Decl (FnProto) - (_) @function.inside) @function.around +(function_declaration + body: (_) @function.inside) @function.around -(TestDecl (_) @test.inside) @test.around +(test_declaration (_) (block) @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 -(Decl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl - (_) @class.inside))))) @class.around +(variable_declaration (identifier) (struct_declaration + (_) @class.inside)) @class.around -(Decl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl - (_) @class.inside))))) @class.around +(variable_declaration (identifier) (enum_declaration + (_) @class.inside)) @class.around -(ParamDeclList +(variable_declaration (identifier) (enum_declaration + (_) @class.inside)) @class.around + +(parameters ((_) @parameter.inside . ","? @parameter.around) @parameter.around) -[ - (doc_comment) - (line_comment) -] @comment.inside -(line_comment)+ @comment.around -(doc_comment)+ @comment.around +(comment) @comment.inside +(comment)+ @comment.around |