mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Merge #8794
8794: Give MergeBehaviour variants better names r=Veykril a=Veykril I never really liked the variant names I gave this enum from the beginning and then I found out about rustfmt's `imports_granularity` config: > imports_granularity > > How imports should be grouped into use statements. Imports will be merged or split to the configured level of granularity. > > Default value: Preserve > Possible values: Preserve, Crate, Module, Item > Stable: No I personally prefer using `crate` over `full` and `module` over last, they seem more descriptive. Keeping these similar between tooling also seems like a good plus point to me. We might even wanna take over the entire enum at some point if we have a `format/cleanup imports` assists in the future which would probably want to also have the `preserve` and `item` options. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
77f0c92fd8
9 changed files with 77 additions and 67 deletions
|
@ -20,7 +20,7 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig {
|
|||
add_call_argument_snippets: true,
|
||||
snippet_cap: SnippetCap::new(true),
|
||||
insert_use: InsertUseConfig {
|
||||
merge: Some(MergeBehavior::Full),
|
||||
merge: Some(MergeBehavior::Crate),
|
||||
prefix_kind: PrefixKind::Plain,
|
||||
group: true,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue