aboutsummaryrefslogtreecommitdiff
path: root/crates/completion
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-01-24 00:32:52 +0000
committerLukas Wirth <[email protected]>2021-01-24 00:32:52 +0000
commita872ebf81f20815501299ae562c39bb9c872ba47 (patch)
treeab1e96340ba6717daec0bd0d3051230463c2916f /crates/completion
parent89fef5307e81d5d23bb65677000f35332190661a (diff)
Support unions in symbol search
Diffstat (limited to 'crates/completion')
-rw-r--r--crates/completion/src/render.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs
index 6eb20df2b..e11b881ca 100644
--- a/crates/completion/src/render.rs
+++ b/crates/completion/src/render.rs
@@ -201,8 +201,7 @@ impl<'a> Render<'a> {
201 ScopeDef::ModuleDef(Module(..)) => CompletionItemKind::SymbolKind(SymbolKind::Module), 201 ScopeDef::ModuleDef(Module(..)) => CompletionItemKind::SymbolKind(SymbolKind::Module),
202 ScopeDef::ModuleDef(Adt(adt)) => CompletionItemKind::SymbolKind(match adt { 202 ScopeDef::ModuleDef(Adt(adt)) => CompletionItemKind::SymbolKind(match adt {
203 hir::Adt::Struct(_) => SymbolKind::Struct, 203 hir::Adt::Struct(_) => SymbolKind::Struct,
204 // FIXME: add CompletionItemKind::Union 204 hir::Adt::Union(_) => SymbolKind::Union,
205 hir::Adt::Union(_) => SymbolKind::Struct,
206 hir::Adt::Enum(_) => SymbolKind::Enum, 205 hir::Adt::Enum(_) => SymbolKind::Enum,
207 }), 206 }),
208 ScopeDef::ModuleDef(Const(..)) => CompletionItemKind::SymbolKind(SymbolKind::Const), 207 ScopeDef::ModuleDef(Const(..)) => CompletionItemKind::SymbolKind(SymbolKind::Const),