aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-11 18:02:12 +0000
committerAleksey Kladov <[email protected]>2019-01-11 18:02:12 +0000
commitf193fbcbae0783953cfaa88aaec6a8d4e1255007 (patch)
treec57734dc82350c2d853f557a40f7aafdc7470bdf /crates/ra_ide_api/src/completion
parent19136cde000c2c227e79bf44febde990fe265cb7 (diff)
actually produce missing def kinds
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),