on 376c19e help sign in
helix/runtime/queries/go/textobjects.scm
33 lines 942 B history raw
1(function_declaration
2 body: (block)? @function.inside) @function.around
4(func_literal
5 (_)? @function.inside) @function.around
7(method_declaration
8 body: (block)? @function.inside) @function.around
10;; struct and interface declaration as class textobject?
11(type_declaration
12 (type_spec (type_identifier) (struct_type (field_declaration_list (_)?) @class.inside))) @class.around
14(type_declaration
15 (type_spec (type_identifier) (interface_type (method_spec)+ @class.inside))) @class.around
17(type_parameter_list
18 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
20(parameter_list
21 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
23(argument_list
24 ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
26(comment) @comment.inside
28(comment)+ @comment.around
30((function_declaration
31 name: (identifier) @_name
32 body: (block)? @test.inside) @test.around
33 (#match? @_name "^Test"))