diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 400a266a2..aa4890375 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -44,7 +44,10 @@ impl Completions { | |||
44 | ) { | 44 | ) { |
45 | use hir::ModuleDef::*; | 45 | use hir::ModuleDef::*; |
46 | 46 | ||
47 | let mut completion_kind = CompletionKind::Reference; | 47 | let completion_kind = match resolution { |
48 | ScopeDef::ModuleDef(BuiltinType(..)) => CompletionKind::BuiltinType, | ||
49 | _ => CompletionKind::Reference, | ||
50 | }; | ||
48 | let (kind, docs) = match resolution { | 51 | let (kind, docs) = match resolution { |
49 | ScopeDef::ModuleDef(Module(it)) => (CompletionItemKind::Module, it.docs(ctx.db)), | 52 | ScopeDef::ModuleDef(Module(it)) => (CompletionItemKind::Module, it.docs(ctx.db)), |
50 | ScopeDef::ModuleDef(Function(func)) => { | 53 | ScopeDef::ModuleDef(Function(func)) => { |
@@ -60,10 +63,7 @@ impl Completions { | |||
60 | ScopeDef::ModuleDef(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), | 63 | ScopeDef::ModuleDef(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), |
61 | ScopeDef::ModuleDef(Trait(it)) => (CompletionItemKind::Trait, it.docs(ctx.db)), | 64 | ScopeDef::ModuleDef(Trait(it)) => (CompletionItemKind::Trait, it.docs(ctx.db)), |
62 | ScopeDef::ModuleDef(TypeAlias(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), | 65 | ScopeDef::ModuleDef(TypeAlias(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), |
63 | ScopeDef::ModuleDef(BuiltinType(..)) => { | 66 | ScopeDef::ModuleDef(BuiltinType(..)) => (CompletionItemKind::BuiltinType, None), |
64 | completion_kind = CompletionKind::BuiltinType; | ||
65 | (CompletionItemKind::BuiltinType, None) | ||
66 | } | ||
67 | ScopeDef::GenericParam(..) => (CompletionItemKind::TypeParam, None), | 67 | ScopeDef::GenericParam(..) => (CompletionItemKind::TypeParam, None), |
68 | ScopeDef::LocalBinding(..) => (CompletionItemKind::Binding, None), | 68 | ScopeDef::LocalBinding(..) => (CompletionItemKind::Binding, None), |
69 | ScopeDef::AdtSelfType(..) | ScopeDef::ImplSelfType(..) => ( | 69 | ScopeDef::AdtSelfType(..) | ScopeDef::ImplSelfType(..) => ( |