Paul Krill
Editor at Large

Gleam update shines on language server

news
Aug 3, 20262 mins

With Gleam v1.18.0, the language server now supports go-to-definition, find-references, and rename for record fields.

Light, sun, shining. Abstract reflections of light.
Credit: irina02/Shutterstock

Gleam, a type-safe and scalable language for the Erlang virtual machine and JavaScript runtimes, has reached version 1.18.0. The update brings full support for record fields to the Gleam language server, along with other improvements.

Gleam 1.18.0 was released July 29. Gleam is billed as “a friendly language for building type-safe systems that scale.”

Gleam 1.18.0 brings three improvements to the Gleam language server. First and foremost, the language server now supports go-to-definition, find-references, and rename for record fields, said Gleam creator Louis Pilfold. These work on the field declaration, labelled arguments, labelled patterns, on record updates, and on record.field accesses, both within a module and across modules.

Second and third, the language server now permits renaming type variables in types, functions, and constants, and adds support for renaming modules. Now when the text editor tells the language server that a Gleam file has been renamed, it will find uses of that module and update them for a new name, Pilford said.

Other improvements in Gleam 1.18.0:

  • The language server’s “pattern match on value” code action now can be triggered on function calls and their returned values.
  • When targeting JavaScript, Gleam’s compiler now will identify data structures where all instances are equivalent, and will use a single value for each use instead of constructing a new instance each time. Testing has shown this has an impactful improvement to performance, Pilford said.
  • Gleam’s build tool now supports an optional path field for Git dependencies to specify a subdirectory within the repository.adding dependencies from git repositories. Previously, the build tool didn’t let users specify a path within the Git repository.
  • The language server now offers a code action to generate a missing type definition when an unknown type is referenced.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author