Skip to main content

Metals v0.6.1 - Radium

· 4 min read

We are excited to announce the release of Metals v0.6.1, codename "Radium" 🎉 The release mostly focused on adding support for the build tools Gradle, Maven and Mill.

Metals is a language server for Scala that works with VS Code, Atom, Vim, Sublime Text and Emacs. Metals is developed at the Scala Center along with contributors from the community.

In this release we merged 24 PRs and closed 6 issues, full details:


  • automatic "import build" for Gradle, Maven and Mill
  • upgraded to Bloop v1.3.2
  • better handling of requests that access the presentation compiler
  • code completions on keywords
  • VS Code doesn't compile projects until it is focused
  • Metals is now a default server in the Sublime LSP package

Check out the website and give Metals a try:

Bloop upgrade

Metals now depends on Bloop v1.3.2 instead of v1.2.5. The v1.3 release of Bloop has a ton of nice improvements that benefit Metals users. For full details, see the Bloop v1.3.0 release notes.

Automatic "import build" for Gradle, Maven and Mill

Now, it's possible to use Metals with the build tools Gradle, Maven and Mill! Importing a build with Gradle, Maven and Mill now works the same way it works for sbt.

For more details, see the corresponding documentation for each build tool:

More reliable shutdown

An issue where the Metals process could continue running even after closing the editor has now been fixed.

Completions freeze less

An issue where Metals could get stuck in an infinite loop using 100% CPU while responding to completions has now been fixed.

Keyword completions

Previously, Metals did not complete keywords like import, new, lazy val or trait. Language keywords are now included in the auto-completions in most cases.

object Main {
// Before
// After

Keywords are suggested based on the context (e.g. you won't see throw suggested if the cursor is not inside a declaration)

The only keywords that are not completed are: extends, finally, with, forSome, catch and finally.

VS Code doesn't compile projects until it is focused

Previously, Metals would trigger compilation in the background even if the VS Code window was not focused. For example, switching git branches in a separate terminal window would still trigger compilation in Metals. Now, Metals waits until the VS Code window is focused to trigger compilation.

This feature is implemented as a LSP extension and is currently only supported by VS Code. For details on how to implement this extension for another editor, see the documentation on integrating a new text editor.

Metals is now a default server in the Sublime LSP package

Metals is now a default server for Scala source files in the LSP package, see tomv564/LSP#571. This greatly simplifies the installation steps for Sublime Text users.


Big thanks to everybody who contributed to this release!

$ git shortlog -sn --no-merges v0.5.1..v0.6.1
Ólafur Páll Geirsson
Adam Gajek
Tomasz Godzik
Gabriele Petronella
Ayoub Benali
Cody Allen
Evgeny Kurnevsky
Jeffrey Lau
Marek Żarnowski
Markus Hauck
German Greiner

Merged PRs

  • Avoid inifinite loop when shortening types #751 (olafurpg)
  • Move releasing info to the website #748 (gabro)
  • Update bloop to 1.3.2 #747 (tgodzik)
  • Split build tool and executable name to show properly in output #746 (tgodzik)
  • Update bloop to 1.3.0 and BSP to 2.0.0-M4 #745 (tgodzik)
  • Add better hint in the doctor for Maven workspaces #744 (tgodzik)
  • Update emacs docs as scala is supported by lsp-mode directly now #741 (kurnevsky)
  • Remove Scalafix from pre-push git hook. #740 (olafurpg)
  • Setup git hooks for scalafmt and scalafix. #738 (olafurpg)
  • Add automatic Mill import to metals #737 (tgodzik)
  • Improve handling of requests that access the presentation compiler. #736 (olafurpg)
  • Enforce scala version for embedded bloop server #735 (tgodzik)
  • Ensure build server shuts down before starting new build connection. #731 (olafurpg)
  • Fix blogpost typo #730 (zoonfafer)
  • Miscellaneous polish fixes #729 (olafurpg)
  • Implement textDocument/codeLens to run main function #728 (marek1840)
  • Fix newlines in process output. #727 (tgodzik)
  • Update sublime doc #726 (ayoub-benali)
  • Fix transitive scala library dependency in Gradle builds. #725 (tgodzik)
  • Adds maven integration to metals #722 (tgodzik)
  • Use CocRequestAsync in Vim docs #717 (ceedubs)
  • Set timeout for shutdown procedure, fixes #715. #716 (olafurpg)
  • Add keyword completion #712 (markus1189)
  • Make bloop versions customizable via server properties. #710 (olafurpg)
  • Pause compile-on-save while the editor window is not focused #709 (agajek)
  • Add gradle support to imports in metals and refactor build tool support. #694 (tgodzik)