mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Use specific kind for the flyimport completions
This commit is contained in:
parent
6742f38e49
commit
7ae1309ac5
1 changed files with 10 additions and 5 deletions
|
@ -51,11 +51,16 @@ pub(crate) fn render_resolution_with_import<'a>(
|
||||||
import_edit: ImportEdit,
|
import_edit: ImportEdit,
|
||||||
resolution: &ScopeDef,
|
resolution: &ScopeDef,
|
||||||
) -> Option<CompletionItem> {
|
) -> Option<CompletionItem> {
|
||||||
Render::new(ctx).render_resolution(
|
Render::new(ctx)
|
||||||
import_edit.import_path.segments.last()?.to_string(),
|
.render_resolution(
|
||||||
Some(import_edit),
|
import_edit.import_path.segments.last()?.to_string(),
|
||||||
resolution,
|
Some(import_edit),
|
||||||
)
|
resolution,
|
||||||
|
)
|
||||||
|
.map(|mut item| {
|
||||||
|
item.completion_kind = CompletionKind::Magic;
|
||||||
|
item
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Interface for data and methods required for items rendering.
|
/// Interface for data and methods required for items rendering.
|
||||||
|
|
Loading…
Reference in a new issue