Include macro attributes to impls, structs, enums, functions etc. textobjects (#2494)

This commit is contained in:
Andrey Tkachenko 2022-05-20 05:19:46 +04:00 committed by GitHub
parent 301ed9b48f
commit 62fd1f6999
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 35 deletions

View file

@ -1,23 +1,62 @@
(function_item
body: (_) @function.inside) @function.around
(
[
(attribute_item)+
(line_comment)+
]*
.
(function_item
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
(impl_item
body: (_) @class.inside) @class.around
(
[
(attribute_item)+
(line_comment)+
]*
.
(impl_item
body: (_) @class.inside)) @class.around
(parameters
(_) @parameter.inside)
(type_parameters
(_) @parameter.inside)
(closure_parameters
(_) @parameter.inside)