mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Make group imports configurable
This commit is contained in:
parent
750d3cb846
commit
96fc01a30b
14 changed files with 79 additions and 23 deletions
|
@ -25,6 +25,7 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig {
|
|||
insert_use: InsertUseConfig {
|
||||
merge: Some(MergeBehavior::Full),
|
||||
prefix_kind: PrefixKind::Plain,
|
||||
group: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -119,7 +120,7 @@ pub(crate) fn check_edit_with_config(
|
|||
|
||||
let mut combined_edit = completion.text_edit().to_owned();
|
||||
if let Some(import_text_edit) =
|
||||
completion.import_to_add().and_then(|edit| edit.to_text_edit(config.insert_use.merge))
|
||||
completion.import_to_add().and_then(|edit| edit.to_text_edit(config.insert_use))
|
||||
{
|
||||
combined_edit.union(import_text_edit).expect(
|
||||
"Failed to apply completion resolve changes: change ranges overlap, but should not",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue