Skip to main content

Metals v0.10.2 - Tungsten

We're happy to announce the release of Metals v0.10.2, which mainly adds support for Scala 3.0.0-RC3 as well a couple of smaller improvements.

Commits since last release62
Merged PRs30
Contributors8
Closed issues8
New features4

For full details: https://github.com/scalameta/metals/milestone/37?closed=1

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

TL;DR#

Check out https://scalameta.org/metals/, and give Metals a try!

  • [Scala 3] Support for Scala 3.0.0-RC3
  • Add code action to add/remove string interpolation.
  • Offer to organize imports when on an unused import.
  • [Scala 3] Better names for types in completions and hovers.

Add/remove string interpolation#

Thanks to some great work by our newest contributor Giggiux it's now possible to:

  • easily add string interpolation to an existing string
val message = "Hello this is a message"

When the cursor is positioned inside of the string we can invoke the code action and get:

val message = s"Hello this is a message"

While this is a simpler code action, it can be paired with other things like completions that allow for a workflow with less manual steps.

  • remove string interpolation if no splices are found

When the cursor is positioned inside a string interpolation, that does not contain any splices ( $identifier), we will now offer an action to quickly get rid of the additional s.

val message = s"Hello this is a message without splices"

will change to:

val message = "Hello this is a message without splices"

Offer to organize imports when on an unused import#

In addition to the usual "organize imports", to try to improve the user experience, Metals now offers a code action to organize imports whenever the cursor is situated on an unused import reported by the diagnostics. Thanks ckipp01 for this new feature!

[Scala 3] Better names for types in completions and hovers.#

Thanks to another great PR by tanishiking Metals will offer completions and hovers that include shorter names instead of fully qualified ones whenever they are currently in scope. They will also be more similar to the ones that you might be accustomed to in Scala 2. You can find some more examples of improvements in the pull request itself.

Miscellaneous#

  • Make insert type work with renamed imports.
  • Treat .srcjar as jars to support Bazel in the future (thanks darl!).

Contributors#

Big thanks to everybody who contributed to this release or reported an issue!

$ git shortlog -sn --no-merges v0.10.1..v0.10.2
Tomasz Godzik
Ayoub Benali
Chris Kipp
Adrien Piquerez
Luigi Frunzio
Rikito Taniguchi
Toshiyuki Takahashi
Vladislav Dolbilov

Merged PRs#

v0.10.2 (2021-04-20)#

Full Changelog

Merged pull requests: