首页›Gleam News›文章

A field day for Gleam’s language server

Louis Pilfold · 2026年7月29日

AI 摘要 AI 生成,可能有误

Gleam v1.18.0 已发布,带来了重大的语言服务器改进,例如针对记录字段的跳转到定义、查找引用和重命名支持,类型变量和模块的重命名并自动更新导入,此外还新增了多项代码操作,包括对值进行模式匹配、转换整数进制、生成缺失的类型以及转换注释。此版本还带来了性能提升:数据单例(data singletons)加快了生成的 JavaScript 的速度,编译器内存竞技场(memory arenas)使格式化程序的速度提升最多达 13%;此外还弃用了有歧义的管道语法,新增了 git 依赖路径支持,并对 Hex 包管理器进行了多项改进。

Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v1.18.0 has been published.

Language server record field support

Gleam's focus on static analysis and static types really helps with creating tooling, and that can be seen very clearly with Gleam's much-loved language server. All its features and capabilities can be seen in its documentation.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Gleam News

Gleam doesn't compile to Erlang source anymore

AI 摘要Gleam v1.19.0 features a rewritten Erlang code generator that now compiles to Erlang abstract forms instead of Erlang source code, significantly improving build times and making runtime metadata such as stack trace line numbers accurately reference the original Gleam source. The release also brings JavaScript compilation improvements (flatter decision trees and faster short list literals), TypeScript API overloads that preserve type information, and better support for external build tools like Elixir's Mix and Erlang's rebar3. Additional updates include language server support for labels (go-to-definition, references, renaming) and the ability to format Gleam code in the browser via the WebAssembly compiler build.

Gleam Gathering 2027 is coming to London!

AI 摘要Gleam Gathering 2027 is coming to London, with tickets already available and the call for talks now open. The article celebrates the success of the first-ever 100% Gleam conference in Bristol earlier this year, whose 2026 talks have all been released online. Community members are encouraged to submit talk proposals if they have interesting Gleam projects, learnings, libraries, tools, or topics worth sharing.

Help from the Github Security Lab

AI 摘要The Gleam project participated in the 4th GitHub Secure Open Source Fund, which provided a 3-week security training program, a 12-month engagement, and $10,000 in sponsorship, and it turned out the project was already in an excellent security position with no vulnerabilities uncovered. Key takeaways include the value of expert guidance in converting security unknowns into knowns, the importance of evidencing security through policies, documentation, and compliance frameworks rather than just being technically secure, and the striking cost-effectiveness of investing in open source security across the fund's 50 projects.

Single file Gleam BEAM programs with escript

AI 摘要Gleam v1.17.0 has been released, introducing the `gleam export escript` command for bundling BEAM projects into single executable files, alongside JavaScript pattern matching optimisations and various language server improvements such as document highlighting, context-aware type printing, and new code actions. The release also includes build tool enhancements like a quiet development mode, an outdated dependencies summary in `gleam deps outdated`, better Git repository detection for monorepos, and support for `todo` in constant expressions. Additionally, the first videos from the all-Gleam Gleam Gathering conference have been published on YouTube.

JavaScript source maps

AI 摘要Gleam v1.16.0 has been released, introducing JavaScript source maps that enable runtime debugging with proper stack traces and breakpoints, along with package-level fault tolerance so compilation continues past broken modules. The release also brings faster string pattern matching on the JavaScript target (nearly 30% faster for some packages), new compiler warnings and error messages, and multiple language server improvements such as code actions for anonymous functions, function extraction, and type hole replacement.