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 | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/runtime/queries/zig/textobjects.scm b/runtime/queries/zig/textobjects.scm index 3d8d5e02..67528943 100644 --- a/runtime/queries/zig/textobjects.scm +++ b/runtime/queries/zig/textobjects.scm @@ -1,25 +1,23 @@ -(function_declaration - body: (_) @function.inside) @function.around +(TopLevelDecl (FnProto) + (_) @function.inside) @function.around -(test_declaration (_) (block) @test.inside) @test.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 -(variable_declaration (identifier) (struct_declaration - (_) @class.inside)) @class.around +(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl + (_) @class.inside))))) @class.around -(variable_declaration (identifier) (enum_declaration - (_) @class.inside)) @class.around +(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl + (_) @class.inside))))) @class.around -(variable_declaration (identifier) (enum_declaration - (_) @class.inside)) @class.around - -(parameters - ((_) @parameter.inside . ","? @parameter.around) @parameter.around) - -(arguments +(ParamDeclList ((_) @parameter.inside . ","? @parameter.around) @parameter.around) -(comment) @comment.inside -(comment)+ @comment.around +[ + (doc_comment) + (line_comment) +] @comment.inside +(line_comment)+ @comment.around +(doc_comment)+ @comment.around |