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 (960 forks)batch import
help wanted

Repository metrics

Stars
 (21,417 stars)
PR merge metrics
 (Avg merge 10d 19h) (69 merged PRs in 30d)

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