Skip to main content

· 7 min read

We're happy to announce the release of Metals v0.11.8, bringing a number of improvements for both Scala 2 and Scala 3.

Commits since last release84
Merged PRs80
Contributors15
Closed issues22
New features5

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

Metals is a language server for Scala that works with VS Code, Vim, Emacs and Sublime Text. 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] Auto import and completion for extension methods
  • [Scala 3] Convert to Named Parameters code action
  • [Scala 3] Scaladoc Completion for Scala3
  • [Scala 3] Completions in string interpolation
  • [Scala 2] Automatic import of types in string interpolations
  • Code Action documentation
  • Support of Scala 3.2.0-RC3, Scala 3.2.0-RC2

and a lot of bugfixes!

[Scala 3] Auto import and completion for extension methods

You might know that Scala 3 has introduced extension methods that allow defining new methods to your existing types.

Previously, Metals couldn't auto-complete extension methods; so developers had to find an appropriate extension method from their workspace and manually import it. But, this was time-consuming and not always beginner friendly.

Now, Metals provides auto-completion for extension methods and automatically imports them!

extension-methods

[Scala 3] Convert to Named Parameters code action

Metals 0.11.7 added ConvertToNamedParameters code action to Scala2.

Thanks to the contribution by @jkciesluk, this feature is now available for Scala 3!

convert-to-named

[Scala 3] Scaladoc completion

Metals now supports offering Scaladoc completions in Scala 3. When typing /** you get an option to auto-complete a scaladoc template for methods, classes, etc.!

scala-doc-completion

[Scala 3] Completions in string interpolation

In the previous versions, whenever users wanted to include a value in a string using string interpolation, they would need to do it all manually. Now, it is possible to get an automatic conversion to string interpolation when typing $value, as well as automatic wrapping in {} when accessing members of such value.

scala3-interpolation

[Scala 2] Automatically import types in string interpolations

Previously, the only suggestions for string interpolations were coming from the currently available symbols in scope. This meant that if you wanted to import something from another package, you would need to do it manually.

This problem is now resolved. Users can easily get such symbols automatically imported, which creates a seamless workflow.

scala2-inteprolation

The feature is also being worked on for Scala 3.

Code Action documentation

Have you ever wondered what kind of refactorings are available in Metals? Check out this new page in the documentation! You can see a list of all the code actions in Metals with examples. https://scalameta.org/metals/docs/codeactions/codeactions

Big thanks to zmerr for writing this documentation.

Contributors

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

$ git shortlog -sn --no-merges v0.11.7..v0.11.8
33 Tomasz Godzik
11 Rikito Taniguchi
9 Scala Steward
6 jkciesluk
6 Kamil Podsiadło
5 vzmerr
3 Vadim Chelyshov
2 Adrien Piquerez
2 scalameta-bot
2 zmerr
1 Arthur S
1 Anton Sviridov
1 tgodzik
1 Scalameta Bot
1 Chris Kipp

Merged PRs

v0.11.8 (2022-08-10)

Full Changelog

Merged pull requests: