aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/lua/textobjects.scm
diff options
context:
space:
mode:
authorLennard Hofmann2022-10-12 13:45:56 +0000
committerGitHub2022-10-12 13:45:56 +0000
commita24fae3b3cca81a4716bc92915005cd424ccf23b (patch)
treea3534f397bfe1bad40538d2793973516518c1bc0 /runtime/queries/lua/textobjects.scm
parent68909dcef46c7b68f1a92cdc7fd04eb89549b6fb (diff)
Update tree-sitter-lua and add textobjects for Lua (#3552)
Diffstat (limited to 'runtime/queries/lua/textobjects.scm')
-rw-r--r--runtime/queries/lua/textobjects.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/queries/lua/textobjects.scm b/runtime/queries/lua/textobjects.scm
new file mode 100644
index 00000000..6fb2000d
--- /dev/null
+++ b/runtime/queries/lua/textobjects.scm
@@ -0,0 +1,15 @@
+(function_definition
+ body: (_) @function.inside) @function.around
+
+(function_declaration
+ body: (_) @function.inside) @function.around
+
+(parameters
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(arguments
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(comment) @comment.inside
+
+(comment)+ @comment.around