mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Consider import prefix config settings during flyimports
This commit is contained in:
parent
23f0d4baa1
commit
4fe5786c0c
3 changed files with 94 additions and 4 deletions
|
@ -151,7 +151,7 @@ pub fn resolve_completion_edits(
|
|||
let import_path = imports_locator::find_exact_imports(&ctx.sema, current_crate, imported_name)
|
||||
.filter_map(|candidate| {
|
||||
let item: hir::ItemInNs = candidate.either(Into::into, Into::into);
|
||||
current_module.find_use_path(db, item)
|
||||
current_module.find_use_path_prefixed(db, item, config.insert_use.prefix_kind)
|
||||
})
|
||||
.find(|mod_path| mod_path.to_string() == full_import_path)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue