summaryrefslogtreecommitdiff
path: root/vendor/queries/python
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/python')
-rw-r--r--vendor/queries/python/textobjects.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/vendor/queries/python/textobjects.scm b/vendor/queries/python/textobjects.scm
new file mode 100644
index 00000000..c4dbcd0e
--- /dev/null
+++ b/vendor/queries/python/textobjects.scm
@@ -0,0 +1,40 @@
+; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389:
+; runtime/queries/python/textobjects.scm.
+; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
+; https://mozilla.org/MPL/2.0/).
+
+(function_definition
+ body: (block)? @function.inside) @function.around
+
+(class_definition
+ body: (block)? @class.inside) @class.around
+
+(parameters
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(lambda_parameters
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(argument_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(comment) @comment.inside
+
+(comment)+ @comment.around
+
+((function_definition
+ name: (identifier) @_name
+ body: (block)? @test.inside) @test.around
+ (#match? @_name "^test_"))
+
+(list
+ (_) @entry.around)
+
+(tuple
+ (_) @entry.around)
+
+(set
+ (_) @entry.around)
+
+(pair
+ (_) @entry.inside) @entry.around