Skip to main content

Metals v0.3 - Iron

· 3 min read

We are excited to announce the release of Metals v0.3, codename "Iron" 🎉 Metals is a language server for Scala.

TL;DR​

  • simple installation
  • accurate diagnostics
  • goto definition
  • text editors: Visual Studio Code, Atom, Vim and Sublime Text
  • no completions

Check out the website and give Metals a try: https://scalameta.org/metals/

Simple installation​

A useful IDE needs to understand your project's directory structure and library dependencies. Metals can now import sbt and Bloop builds with the following workflow

  • Open a directory in your editor
  • Click on a button to import the build
  • Wait for the build import step to complete, this may take a while
  • Enjoy IDE features 👌
  • When your build changes, Metals asks you to import again.

vscode-import-build

Accurate diagnostics​

Once your build has been imported, Metals triggers compilation on file save and publishes compiler errors as red squiggles in your editor. By construction, this approach avoids the situation where users see different errors in their editor and the build tool.

accurate-diagnostics

Goto definition​

Metals supports goto definition for project sources and Scala+Java library dependencies. Navigation works even when the open buffer contains syntax errors.

Navigation in Metals is fast and consumes little memory. For a case study project, Metals indexes 800k lines of Scala code per second and the resulting search index requires 25Mb RAM per million lines of code.

goto-definition

Text editors​

Thanks to the Language Server Protocol, Metals works multiple text editors. The following editors have been validated to work with Metals and the installation steps have been documented on the Metals website.

Contributors​

Big thanks to all the contributors who contributed to this release. In particular, I want to thank the following people:

  • Jorge Vicente Cantero (@jvican) for his great work in Bloop and helping out with unblocking a lot of Metals issues on the build side. Most the heavy lifting in "simple installation" is provided by Bloop.
  • Gabriele Petronella (@gabro) for his great work on the VS Code plugin and heroic code reviews of multiple large PRs (of which one that was +12,645 −1,126!!).
  • Alexey Alekhin (@laughedelic) for his great work on the Atom ide-scala package.
  • Eugene Burmako (@xeno-by) for close collaboration on Scalameta and SemanticDB that made the features in this release possible.
  • Justin Kaeser (@jastice) from Jetbrains for collaboration on the Build Server Protocol specification and bsp4j library.
$ git shortlog -sn --no-merges v0.1.0..v0.3.1
Ólafur Páll Geirsson
Gabriele Petronella
Corey O'Connor
Pavel Logvinov
Cody Allen