gleam-lang/gleam

LSP doesn't show auto complete on case statement

Open

#5 404 ouverte le 28 févr. 2026

Voir sur GitHub
 (19 commentaires) (3 réactions) (0 assignés)Rust (960 forks)batch import
help wanted

Métriques du dépôt

Stars
 (21 417 stars)
Métriques de merge PR
 (Merge moyen 10j 19h) (69 PRs mergées en 30 j)

Description

How to reproduce:

type Foo {
  Foo(bar: List(String))
}

pub fn main() -> Nil {
  let foo_list = [Foo(bar: ["hello"])]
  
  case list.first(foo_list) {
    Ok(foo) -> foo. // auto complete doesn't show
    Error(_) -> io.println("world")
  }
}

When enclosing the statement within a block, the auto complete showed up.

type Foo {
  Foo(bar: List(String))
}

pub fn main() -> Nil {
  let foo_list = [Foo(bar: ["hello"])]
  
  case list.first(foo_list) {
    Ok(foo) -> {foo.} // auto complete showed up
    Error(_) -> io.println("world")
  }
}

But if you type one letter, the auto complete showed up even without block.

type Foo {
  Foo(bar: List(String))
}

pub fn main() -> Nil {
  let foo_list = [Foo(bar: ["hello"])]
  
  case list.first(foo_list) {
    Ok(foo) -> foo.b // auto complete showed up
    Error(_) -> io.println("world")
  }
}

Gleam version: v1.14

Guide contributeur