From f193fbcbae0783953cfaa88aaec6a8d4e1255007 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 11 Jan 2019 21:02:12 +0300 Subject: actually produce missing def kinds --- crates/ra_ide_api/src/completion/completion_item.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'crates/ra_ide_api/src/completion') 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 { EnumVariant, Binding, Field, + Static, + Const, + Trait, + TypeAlias, } #[derive(Debug, PartialEq, Eq)] @@ -153,6 +157,22 @@ impl Builder { types: Some(hir::Def::Enum(..)), .. } => CompletionItemKind::Enum, + PerNs { + types: Some(hir::Def::Trait(..)), + .. + } => CompletionItemKind::Trait, + PerNs { + types: Some(hir::Def::Type(..)), + .. + } => CompletionItemKind::TypeAlias, + PerNs { + values: Some(hir::Def::Const(..)), + .. + } => CompletionItemKind::Const, + PerNs { + values: Some(hir::Def::Static(..)), + .. + } => CompletionItemKind::Static, PerNs { values: Some(hir::Def::Function(function)), .. -- cgit v1.2.3