capture rust closures as function textobjects

Closures like

    iter.map(|a| a + 1)

Are sort-of functions, so `]f` or `maf` or `mif` can apply to them
as well as named function definitions.
This commit is contained in:
Michael Davis 2022-06-06 10:18:14 -05:00 committed by Blaž Hrastnik
parent f7a3d35752
commit 4a27e2d938

View file

@ -7,6 +7,8 @@
(function_item
body: (_) @function.inside)) @function.around
(closure_expression body: (_) @function.inside) @function.around
(
[
(attribute_item)+