gleam-lang/gleam
View on GitHubImport module in code action to fill missing case patterns
Open
#3,568 opened on Aug 27, 2024
help wanted
Description
Currently, if a user runs the "Add missing patterns" code action on this code:
case some_value.optional_field {}
They would get something like:
case some_value.optional_field {
option.Some(_) -> todo
option.None -> todo
}
Which is correct, but doesn't account for the fact that they need to import the gleam/option module. It would be helpful to detect this and automatically import gleam/option in this case.