mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add config to unconditionally prefer core imports over std
Fixes https://github.com/rust-lang/rust-analyzer/issues/12979
This commit is contained in:
parent
6909556435
commit
7d19971666
33 changed files with 156 additions and 43 deletions
|
@ -234,7 +234,12 @@ pub fn resolve_completion_edits(
|
|||
);
|
||||
let import = items_with_name
|
||||
.filter_map(|candidate| {
|
||||
current_module.find_use_path_prefixed(db, candidate, config.insert_use.prefix_kind)
|
||||
current_module.find_use_path_prefixed(
|
||||
db,
|
||||
candidate,
|
||||
config.insert_use.prefix_kind,
|
||||
config.prefer_core,
|
||||
)
|
||||
})
|
||||
.find(|mod_path| mod_path.to_string() == full_import_path);
|
||||
if let Some(import_path) = import {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue