From 7ae1309ac58bba9e5694629c21287f29f137d6b6 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sat, 16 Jan 2021 19:40:59 +0200 Subject: Use specific kind for the flyimport completions --- crates/completion/src/render.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs index e93c59f71..820dd01d1 100644 --- a/crates/completion/src/render.rs +++ b/crates/completion/src/render.rs @@ -51,11 +51,16 @@ pub(crate) fn render_resolution_with_import<'a>( import_edit: ImportEdit, resolution: &ScopeDef, ) -> Option { - 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. -- cgit v1.2.3