# A field day for Gleam's language server

DevFeed: [A field day for Gleam's language server](<https://devfeed.tech/articles/a-field-day-for-gleam-s-language-server-51503.md>)

Original publisher: [Read original article](<https://gleam.run/news/a-field-day-for-gleams-language-server>)

Author: Louis Pilfold

Published: 2026-07-29T00:00:00Z

Content type: release

Language: en

Sources: [Gleam](<https://devfeed.tech/sources/gleam.md>)

Topics: [Release notes](<https://devfeed.tech/topics/release-notes.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [modules](<https://devfeed.tech/topics/modules.md>), [conditionals](<https://devfeed.tech/topics/conditionals.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [field](<https://devfeed.tech/tags/field.md>), [fields](<https://devfeed.tech/tags/fields.md>), [gleam](<https://devfeed.tech/tags/gleam.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [language](<https://devfeed.tech/tags/language.md>), [modules](<https://devfeed.tech/tags/modules.md>), [server](<https://devfeed.tech/tags/server.md>), [type](<https://devfeed.tech/tags/type.md>), [variables](<https://devfeed.tech/tags/variables.md>)

## AI overview

Gleam v1.18.0 adds broad language-server support for record-field navigation, references, and renaming across modules, plus renaming of type variables and modules, a pattern-match code action for function calls, and several other editing actions. The JavaScript compiler now reuses a single value for data structures whose instances are equivalent; tests report performance gains, especially in Lustre view functions. Compiler and formatter work using memory arenas made `gleam format` up to 13% faster on Lustre projects with 10% lower peak memory, and remains ongoing. The release also deprecates an ambiguous pipe form, with a code action to rewrite it explicitly; adds a subdirectory `path` option for Git dependencies; and accepts a read-only Hex API key through `HEXPM_READ_API_KEY` to access higher rate limits. Hex error messages, documentation URLs, and owner commands also received updates.

## Source excerpt

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. One remaining missing part of it was full support for record fields, a problem now fixed! The language server now supports go-to-definition, find-references and rename for record fields. These work on the field declaration, on labelled arguments, on labelled patterns, on record updates and on record.field accesses, both within a module and across modules. For example: pub type Person { Person(name: String, age: Int) } pub fn main() { let lucy = Person(name: "Lucy", age: 10) lucy.name // ^ Go-to-definition jumps to the `name` field, and renaming it here // renames the field everywhere it is used. } Thank you Alistair Smith! People will be very happy for this one! Type variable renaming Similarly, the language server now permits renaming type variables in functions, types, and constants. For example: pub fn twice(value: a, f: fn(a) -> a) -> a { // ^ Rename to "anything" f(f(value)) } Produces: pub fn twice(value: anything, f: fn(anything) -> anything) -> anything { f(f(value)) } Thank you Surya Rose! Updating imports for renamed modules Another addition to the language server is support for renaming modules. When your text editor tells the language server that a Gleam file has been renamed, it will find all the uses of that module and update them for the new name. For example: import db_users pub fn main() -> db_users.User { db_users.new("username") } Renaming db_users.gleam to database/user.gleam would produce: import database/user pub fn main() -> user.User { user.new("username") } Thank you Surya Rose! Pattern match on value code action Flow control in Gleam is done w