diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 5cabe9a32..e9bf2b96d 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -67,9 +67,15 @@ impl Completions { | |||
67 | Resolution::Def(Function(func)) => { | 67 | Resolution::Def(Function(func)) => { |
68 | return self.add_function_with_name(ctx, Some(local_name), *func); | 68 | return self.add_function_with_name(ctx, Some(local_name), *func); |
69 | } | 69 | } |
70 | Resolution::Def(Struct(it)) => (CompletionItemKind::Struct, it.docs(ctx.db)), | 70 | Resolution::Def(AdtDef(hir::AdtDef::Struct(it))) => { |
71 | Resolution::Def(Union(it)) => (CompletionItemKind::Struct, it.docs(ctx.db)), | 71 | (CompletionItemKind::Struct, it.docs(ctx.db)) |
72 | Resolution::Def(Enum(it)) => (CompletionItemKind::Enum, it.docs(ctx.db)), | 72 | } |
73 | Resolution::Def(AdtDef(hir::AdtDef::Union(it))) => { | ||
74 | (CompletionItemKind::Struct, it.docs(ctx.db)) | ||
75 | } | ||
76 | Resolution::Def(AdtDef(hir::AdtDef::Enum(it))) => { | ||
77 | (CompletionItemKind::Enum, it.docs(ctx.db)) | ||
78 | } | ||
73 | Resolution::Def(EnumVariant(it)) => (CompletionItemKind::EnumVariant, it.docs(ctx.db)), | 79 | Resolution::Def(EnumVariant(it)) => (CompletionItemKind::EnumVariant, it.docs(ctx.db)), |
74 | Resolution::Def(Const(it)) => (CompletionItemKind::Const, it.docs(ctx.db)), | 80 | Resolution::Def(Const(it)) => (CompletionItemKind::Const, it.docs(ctx.db)), |
75 | Resolution::Def(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), | 81 | Resolution::Def(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), |