gleam-lang/gleam

LSP fails to suggest completion for locally defined `use`d argument

开放

#5,258 创建于 2026年1月3日

 (2 条评论) (0 个反应) (0 位负责人)Rust (960 个派生)batch import
help wanted

仓库指标

星标
 (21,417 个星标)
PR 合并指标
 (平均合并 10天 19小时) (30 天内合并 69 个 PR)

描述

LSP fails to suggest completion for locally defined used argument. For example, if I use Lustre and want to create a custom effect I may write something like this:

fn load_data(msg: fn(String) -> msg) -> Effect(msg) {
  use dispatch <- effect.from
  let data = "Example data"
  dispatch(msg(data))
}

If I partially type disp in the last line expecting a suggestion — I wouldn't get it:

Note: suggestion works fine if I convert use to the callback-style call.

Versions:

  • Gleam: 1.14.0
  • VSCodium: 1.107.18627
  • Lustre: 5.4.0
  • macOS: 15.7.3

贡献者指南