gleam-lang/gleam

Qualify or import generated variants

Closed

#5735 opened on May 19, 2026

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

When you use the generate variant LS action for a type that lives in another module:

Event(..) -> [PlaceIn(SmokedPile)]
// Use generate variant here ^

If PlaceIn is in another module, the variant is generated correctly but it's not imported by the currrent module, so you need to manually import it.

Contributor guide