#6348·gleam

ls: support for unqualified constants in clause gaurds

Author: ankddevCreated Sep 25, 2026Updated Sep 25, 2026

I noticed that all find-refernces, go-to-definition, renaming don't work for unqualified constants in clause guards.

gleam
import wibble.{wobble}

const woo = True

pub fn go(a) {
  case a {
    _ if wobble && wibble.wubble && woo -> todo
    //   ^^^^^^                     ^^^ Doesn't work here
    //             ^^^^^^^^^^^^^ But works here
    _ -> todo
  }
}

Moreover, when I hover them, I see only a as type and no documentation or real type. Again, it works with qualified constants.