mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Share import_assets and related entities
This commit is contained in:
parent
3782c78d75
commit
6742f38e49
20 changed files with 411 additions and 332 deletions
|
@ -127,6 +127,7 @@ pub fn completions(
|
|||
completions::macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx);
|
||||
completions::trait_impl::complete_trait_impl(&mut acc, &ctx);
|
||||
completions::mod_::complete_mod(&mut acc, &ctx);
|
||||
completions::flyimport::import_on_the_fly(&mut acc, &ctx);
|
||||
|
||||
Some(acc)
|
||||
}
|
||||
|
@ -153,7 +154,9 @@ pub fn resolve_completion_edits(
|
|||
})
|
||||
.find(|mod_path| mod_path.to_string() == full_import_path)?;
|
||||
|
||||
ImportEdit { import_path, import_scope }.to_text_edit(config.merge).map(|edit| vec![edit])
|
||||
ImportEdit { import_path, import_scope }
|
||||
.to_text_edit(config.insert_use.merge)
|
||||
.map(|edit| vec![edit])
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue