Allow to disable import insertion on single path glob imports
This commit is contained in:
parent
84507a0b9c
commit
2ee090faaf
14 changed files with 99 additions and 17 deletions
|
|
@ -378,7 +378,7 @@ impl ImportEdit {
|
|||
let _p = profile::span("ImportEdit::to_text_edit");
|
||||
|
||||
let new_ast = self.scope.clone_for_update();
|
||||
insert_use::insert_use(&new_ast, mod_path_to_ast(&self.import.import_path), cfg);
|
||||
insert_use::insert_use(&new_ast, mod_path_to_ast(&self.import.import_path), &cfg);
|
||||
let mut import_insert = TextEdit::builder();
|
||||
algo::diff(self.scope.as_syntax_node(), new_ast.as_syntax_node())
|
||||
.into_text_edit(&mut import_insert);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig {
|
|||
prefix_kind: PrefixKind::Plain,
|
||||
enforce_granularity: true,
|
||||
group: true,
|
||||
skip_glob_imports: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue