Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add group_imports rule to .rustfmt.toml #636

Closed
damirka opened this issue Feb 9, 2021 · 1 comment
Closed

[Feature] Add group_imports rule to .rustfmt.toml #636

damirka opened this issue Feb 9, 2021 · 1 comment
Assignees
Labels
feature A new feature.

Comments

@damirka
Copy link
Contributor

damirka commented Feb 9, 2021

馃殌 Feature

Given number of comments related to imports section which @howardwu left in my CLI PR (#632) I suggest adding new rule for grouping imports in .rustfmt.toml file - group_imports.

See param description here (link).
Example output:

use std::path::PathBuf;

use pest_ast::FromPest;
use serde::Serialize;

use crate::ast::Rule;

Motivation

We already have similar code style internally and instead of fixing it manually we can apply new rule to formatter.

Implementation

# .rustfmt.toml
group_imports = "StdExternalCrate"
@damirka damirka added the feature A new feature. label Feb 9, 2021
@damirka damirka self-assigned this Feb 9, 2021
@damirka damirka changed the title [Feature] Add group_imports = "StdExternalCrate" to .rustfmt.toml [Feature] Add group_imports rule to .rustfmt.toml Feb 9, 2021
@damirka
Copy link
Contributor Author

damirka commented Feb 22, 2021

Closing as have not received enough interest rn.

@damirka damirka closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature.
Projects
None yet
Development

No branches or pull requests

1 participant