Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/wesl/textobjects.scm')
-rw-r--r--runtime/queries/wesl/textobjects.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/queries/wesl/textobjects.scm b/runtime/queries/wesl/textobjects.scm
new file mode 100644
index 00000000..c5b3f93e
--- /dev/null
+++ b/runtime/queries/wesl/textobjects.scm
@@ -0,0 +1,23 @@
+(function_decl
+ body: (_) @function.inside) @function.around
+
+(struct_decl
+ body: (_) @class.inside) @class.around
+
+(param_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(argument_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(template_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+[
+ (line_comment)
+ (block_comment)
+] @comment.inside
+
+(line_comment)+ @comment.around
+
+(block_comment) @comment.around