aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--runtime/queries/vala/textobjects.scm27
2 files changed, 28 insertions, 1 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index 97ea8e86..4a0b4b0a 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -190,7 +190,7 @@
| unison | ✓ | | ✓ | |
| uxntal | ✓ | | | |
| v | ✓ | ✓ | ✓ | `v-analyzer` |
-| vala | ✓ | | | `vala-language-server` |
+| vala | ✓ | ✓ | | `vala-language-server` |
| verilog | ✓ | ✓ | | `svlangserver` |
| vhdl | ✓ | | | `vhdl_ls` |
| vhs | ✓ | | | |
diff --git a/runtime/queries/vala/textobjects.scm b/runtime/queries/vala/textobjects.scm
new file mode 100644
index 00000000..b84d9a20
--- /dev/null
+++ b/runtime/queries/vala/textobjects.scm
@@ -0,0 +1,27 @@
+(method_declaration
+ (block) @function.inside) @function.around
+
+(creation_method_declaration
+ (block) @function.inside) @function.around
+
+(method_declaration
+ ((parameter) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+[
+ (class_declaration)
+ (struct_declaration)
+ (interface_declaration)
+] @class.around
+
+(type_arguments
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(creation_method_declaration
+ ((parameter) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(method_call_expression
+ ((argument) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(comment) @comment.inside
+
+(comment)+ @comment.around