-
Notifications
You must be signed in to change notification settings - Fork 999
Closed
Labels
A-importsArea: imports, e.g. `use` syntaxArea: imports, e.g. `use` syntaxC-feature-requestCategory: a feature request (not decided/implemented)Category: a feature request (not decided/implemented)
Milestone
Description
In clang-format recently the grouping and sorting of includes was introduced.
see: clang-format search for IncludeCategories
Where one is able to specify via regex some index and based on that the sorting is applied.
Since rust has proper import and crates we dont need any regex driven categories to achieve sorting.
It would be nice if cargo-fmt not only sorted includes alphabetically but also groupped them.
something like:
- std
- alphabetically sorted 3rd party imports, so first uses from use a::b; and then use b::c etc.
- alphabetically sorted workspace imports.
- alphabetically sorted this crate imports.
Inserting blank lines between these groups above
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-importsArea: imports, e.g. `use` syntaxArea: imports, e.g. `use` syntaxC-feature-requestCategory: a feature request (not decided/implemented)Category: a feature request (not decided/implemented)
Type
Fields
Give feedbackNo fields configured for issues without a type.