Merge #11691
11691: feat: Suggest union literals, suggest union fields within an empty union literal r=Veykril a=m0rg-dev
Adds a `Union {…}` completion in contexts where a union is expected, expanding to a choice of available fields (if snippets are supported):


Also, adds support for listing possible fields in an empty union literal.


Closes #11568.
Co-authored-by: Morgan Thomas <corp@m0rg.dev>
This commit is contained in:
@@ -9,6 +9,7 @@ pub(crate) mod pattern;
|
||||
pub(crate) mod type_alias;
|
||||
pub(crate) mod struct_literal;
|
||||
pub(crate) mod compound;
|
||||
pub(crate) mod union_literal;
|
||||
|
||||
use hir::{AsAssocItem, HasAttrs, HirDisplay, ScopeDef};
|
||||
use ide_db::{helpers::item_name, RootDatabase, SnippetCap, SymbolKind};
|
||||
|
||||
Reference in New Issue
Block a user