gleam-lang/gleam

Support `textDocument/documentHighlight` message for usages of values

Fermée

#5 441 ouverte le 10 mars 2026

 (3 commentaires) (0 réaction) (0 personne assignée)Rust (960 forks)batch import
help wanted

Métriques du dépôt

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

Description

When triggering the message over the usage of a variable in a scope, highlight all instances of that variable.

For example:

fn foo() {
  let bar = 5
  //  ^^^
  let baz = bar * 2
  //        ^^^
  // Cursor here ↓ (for example)
  let qux = case bar {
  //             ^^^
    a if bar == 2 -> a
    //   ^^^
    b if baz == 3 -> b
    _ -> 5
  }
  baz + quux(bar) + qux
  //         ^^^
}

fn quux(a) { todo }

See #5427.

Guide contributeur