aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/v/textobjects.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/v/textobjects.scm')
-rw-r--r--runtime/queries/v/textobjects.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/runtime/queries/v/textobjects.scm b/runtime/queries/v/textobjects.scm
new file mode 100644
index 00000000..40eb101f
--- /dev/null
+++ b/runtime/queries/v/textobjects.scm
@@ -0,0 +1,27 @@
+(function_declaration
+ body: (block)? @function.inside) @function.around
+
+((function_declaration
+ name: (identifier) @_name
+ body: (block)? @test.inside) @test.around
+ (#match? @_name "^test"))
+
+(fn_literal
+ body: (block)? @function.inside) @function.around
+
+(parameter_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(call_expression
+ (argument_list
+ ((_) @parameter.inside) @parameter.around))
+
+(struct_declaration
+ (struct_field_declaration_list) @class.inside) @class.around
+
+(struct_field_declaration_list
+ ((_) @parameter.inside) @parameter.around)
+
+(comment) @comment.inside
+(comment)+ @comment.around
+