gleam-lang/gleam

LSP code action: turn (wrong) C-style type definition into a single constructor type

Open

#3,479 opened on Aug 2, 2024

View on GitHub
 (3 comments) (1 reaction) (0 assignees)Rust (21,417 stars) (960 forks)batch import
help wanted

Description

Now that the compiler can recognize that when the user is creating this type

pub type User {
  name: String
}

they actually need to define it like this

pub type User {
  User(
    name: String,
  )
}

it would make sense to offer a code action on hover to do that automatically.

Contributor guide