diff options
author | David | 2022-08-28 21:03:39 +0000 |
---|---|---|
committer | GitHub | 2022-08-28 21:03:39 +0000 |
commit | db18206795ba6ccb0400e15c05c0f61f755d265e (patch) | |
tree | 20e6e3805639e2faccd9c4a3d6c55051d27f7556 /runtime/queries/rust | |
parent | e06678278267a76a1d9e29b36d4734bcb39eabec (diff) |
Fix rust text objects (#3590)
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r-- | runtime/queries/rust/textobjects.scm | 62 |
1 files changed, 12 insertions, 50 deletions
diff --git a/runtime/queries/rust/textobjects.scm b/runtime/queries/rust/textobjects.scm index 94c8c9f8..7005d9c7 100644 --- a/runtime/queries/rust/textobjects.scm +++ b/runtime/queries/rust/textobjects.scm @@ -1,58 +1,20 @@ -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (function_item - body: (_) @function.inside)) @function.around +(function_item + body: (_) @function.inside) @function.around(closure_expression body: (_) @function.inside) @function.around -(closure_expression body: (_) @function.inside) @function.around +(struct_item + body: (_) @class.inside) @class.around -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (struct_item - body: (_) @class.inside)) @class.around +(enum_item + body: (_) @class.inside) @class.around -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (enum_item - body: (_) @class.inside)) @class.around +(union_item + body: (_) @class.inside) @class.around -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (union_item - body: (_) @class.inside)) @class.around +(trait_item + body: (_) @class.inside) @class.around -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (trait_item - body: (_) @class.inside)) @class.around - -( - [ - (attribute_item)+ - (line_comment)+ - ]* - . - (impl_item - body: (_) @class.inside)) @class.around +(impl_item + body: (_) @class.inside) @class.around (parameters ((_) @parameter.inside . ","? @parameter.around) @parameter.around) |