Open
Description
In code i write i have taken to group the import statements into 4 groups:
- "std-like" crates which include all the normal std crates (
std
,alloc
,core
) and large crates liketokio
or frameworks likeaxum
orbevy
pretty much everything which fundamentaly controls how my code will look like. - Other external crates
- Workspace internal crates
- Crate internal imports
I have thought about trying to implement this in rustfmt
, but i don't know how doable this is.
I guess making crates in 1. optionally configurable shouldn't be that hard, but does rustfmt get any workspace information? Is it feasible to optionally implement retrieving workspace information for such a feature, or would this require some larger architectural/conceptual change?
Thanks in advance :)