Skip to content

Commit

Permalink
Add textobject queries for vala (helix-editor#8541)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhain authored and chrisshort-udig committed Mar 31, 2024
1 parent d4ce022 commit 820c9ef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
| unison || || |
| uxntal || | | |
| v |||| `v-analyzer` |
| vala || | | `vala-language-server` |
| vala || | | `vala-language-server` |
| verilog ||| | `svlangserver` |
| vhdl || | | `vhdl_ls` |
| vhs || | | |
Expand Down
27 changes: 27 additions & 0 deletions runtime/queries/vala/textobjects.scm
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 820c9ef

Please sign in to comment.