aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/completion_item.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide_api/src/completion/completion_item.rs
index 6a9770429..e7fa967a0 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide_api/src/completion/completion_item.rs
@@ -33,6 +33,10 @@ pub enum CompletionItemKind {
33 EnumVariant, 33 EnumVariant,
34 Binding, 34 Binding,
35 Field, 35 Field,
36 Static,
37 Const,
38 Trait,
39 TypeAlias,
36} 40}
37 41
38#[derive(Debug, PartialEq, Eq)] 42#[derive(Debug, PartialEq, Eq)]
@@ -154,6 +158,22 @@ impl Builder {
154 .. 158 ..
155 } => CompletionItemKind::Enum, 159 } => CompletionItemKind::Enum,
156 PerNs { 160 PerNs {
161 types: Some(hir::Def::Trait(..)),
162 ..
163 } => CompletionItemKind::Trait,
164 PerNs {
165 types: Some(hir::Def::Type(..)),
166 ..
167 } => CompletionItemKind::TypeAlias,
168 PerNs {
169 values: Some(hir::Def::Const(..)),
170 ..
171 } => CompletionItemKind::Const,
172 PerNs {
173 values: Some(hir::Def::Static(..)),
174 ..
175 } => CompletionItemKind::Static,
176 PerNs {
157 values: Some(hir::Def::Function(function)), 177 values: Some(hir::Def::Function(function)),
158 .. 178 ..
159 } => return self.from_function(ctx, function), 179 } => return self.from_function(ctx, function),