You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My main use case for sorting is things like functions. The problem with that is everything isn't usually nested neatly under a single node, things like comments and attributes can be at the same level as the function declaration. Here is an example in rust:
As you can see from this tree, the function node is preceded by the comment and attribute nodes:
What I'd love to be able to do is sort all function_item nodes at the same level by name, and include any preceding nodes that belong with the function.
The text was updated successfully, but these errors were encountered:
This is a very interesting idea and I think something that can be useful for people. I'll look into adding this and comment here with the pr for you to look at. Any ideas for the config key for it? Something like sibling_nodes or anchor_nodes that will take a list of possible nodes that should move with it?
My main use case for sorting is things like functions. The problem with that is everything isn't usually nested neatly under a single node, things like comments and attributes can be at the same level as the function declaration. Here is an example in rust:
As you can see from this tree, the function node is preceded by the comment and attribute nodes:
What I'd love to be able to do is sort all
function_item
nodes at the same level by name, and include any preceding nodes that belong with the function.The text was updated successfully, but these errors were encountered: