From a872ebf81f20815501299ae562c39bb9c872ba47 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 24 Jan 2021 01:32:52 +0100 Subject: Support unions in symbol search --- crates/completion/src/render.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/completion') 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> { ScopeDef::ModuleDef(Module(..)) => CompletionItemKind::SymbolKind(SymbolKind::Module), ScopeDef::ModuleDef(Adt(adt)) => CompletionItemKind::SymbolKind(match adt { hir::Adt::Struct(_) => SymbolKind::Struct, - // FIXME: add CompletionItemKind::Union - hir::Adt::Union(_) => SymbolKind::Struct, + hir::Adt::Union(_) => SymbolKind::Union, hir::Adt::Enum(_) => SymbolKind::Enum, }), ScopeDef::ModuleDef(Const(..)) => CompletionItemKind::SymbolKind(SymbolKind::Const), -- cgit v1.2.3