aboutsummaryrefslogtreecommitdiff
path: root/crates/completion
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-01-16 17:40:59 +0000
committerKirill Bulatov <[email protected]>2021-01-16 17:40:59 +0000
commit7ae1309ac58bba9e5694629c21287f29f137d6b6 (patch)
tree74d718205fae084b1a3d70775452dcb7a17d20e1 /crates/completion
parent6742f38e49d001359a7a9911becc0fcae4c67910 (diff)
Use specific kind for the flyimport completions
Diffstat (limited to 'crates/completion')
-rw-r--r--crates/completion/src/render.rs15
1 files changed, 10 insertions, 5 deletions
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>(
51 import_edit: ImportEdit, 51 import_edit: ImportEdit,
52 resolution: &ScopeDef, 52 resolution: &ScopeDef,
53) -> Option<CompletionItem> { 53) -> Option<CompletionItem> {
54 Render::new(ctx).render_resolution( 54 Render::new(ctx)
55 import_edit.import_path.segments.last()?.to_string(), 55 .render_resolution(
56 Some(import_edit), 56 import_edit.import_path.segments.last()?.to_string(),
57 resolution, 57 Some(import_edit),
58 ) 58 resolution,
59 )
60 .map(|mut item| {
61 item.completion_kind = CompletionKind::Magic;
62 item
63 })
59} 64}
60 65
61/// Interface for data and methods required for items rendering. 66/// Interface for data and methods required for items rendering.