Make group imports configurable

This commit is contained in:
asv
2021-03-06 13:02:26 +02:00
parent 750d3cb846
commit 96fc01a30b
14 changed files with 79 additions and 23 deletions

View File

@@ -35,7 +35,8 @@ config_data! {
assist_importMergeBehaviour: MergeBehaviorDef = "\"full\"",
/// The path structure for newly inserted paths to use.
assist_importPrefix: ImportPrefixDef = "\"plain\"",
/// Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines.
assist_importGroup: bool = "true",
/// Show function name and docs in parameter hints.
callInfo_full: bool = "true",
@@ -574,6 +575,7 @@ impl Config {
ImportPrefixDef::ByCrate => PrefixKind::ByCrate,
ImportPrefixDef::BySelf => PrefixKind::BySelf,
},
group: self.data.assist_importGroup,
}
}
pub fn completion(&self) -> CompletionConfig {