mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 13:24:22 +00:00
Use specific kind for the flyimport completions
This commit is contained in:
parent
6742f38e49
commit
7ae1309ac5
@ -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 New Issue
Block a user