diff options
author | Erasin Wang | 2023-03-15 21:22:24 +0000 |
---|---|---|
committer | GitHub | 2023-03-15 21:22:24 +0000 |
commit | fb56a4bb75121f4797d80e14bceee9feb870cfb2 (patch) | |
tree | 07d59a181f3e9cec1a64dbc6a65273fb18d9bb50 /runtime/queries/v/textobjects.scm | |
parent | 64c137bd3d7ac7f82f538f5dd520e3aa8bca0d1a (diff) |
Improve tree-sitter queries for vlang (#6279)
- Update hightlight
- add indents
- add textobject
- add injections
Diffstat (limited to 'runtime/queries/v/textobjects.scm')
-rw-r--r-- | runtime/queries/v/textobjects.scm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/runtime/queries/v/textobjects.scm b/runtime/queries/v/textobjects.scm new file mode 100644 index 00000000..40eb101f --- /dev/null +++ b/runtime/queries/v/textobjects.scm @@ -0,0 +1,27 @@ +(function_declaration + body: (block)? @function.inside) @function.around + +((function_declaration + name: (identifier) @_name + body: (block)? @test.inside) @test.around + (#match? @_name "^test")) + +(fn_literal + body: (block)? @function.inside) @function.around + +(parameter_list + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(call_expression + (argument_list + ((_) @parameter.inside) @parameter.around)) + +(struct_declaration + (struct_field_declaration_list) @class.inside) @class.around + +(struct_field_declaration_list + ((_) @parameter.inside) @parameter.around) + +(comment) @comment.inside +(comment)+ @comment.around + |