mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +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,
|
||||
resolution: &ScopeDef,
|
||||
) -> Option<CompletionItem> {
|
||||
Render::new(ctx).render_resolution(
|
||||
import_edit.import_path.segments.last()?.to_string(),
|
||||
Some(import_edit),
|
||||
resolution,
|
||||
)
|
||||
Render::new(ctx)
|
||||
.render_resolution(
|
||||
import_edit.import_path.segments.last()?.to_string(),
|
||||
Some(import_edit),
|
||||
resolution,
|
||||
)
|
||||
.map(|mut item| {
|
||||
item.completion_kind = CompletionKind::Magic;
|
||||
item
|
||||
})
|
||||
}
|
||||
|
||||
/// Interface for data and methods required for items rendering.
|
||||
|
|
Loading…
Reference in a new issue