We are excited to announce the release of Metals v0.7.2 - codename "Thorium" 🎉 The release includes mostly bug fixes with some smaller new features. We are skipping over 0.7.1 due to a critical bug we discovered

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 and VirtusLab along with contributors from the community.

In this release we merged 39 PRs and closed 11 issues, full details: https://github.com/scalameta/metals/milestone/14?closed=1

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

support for Scala 2.12.9

fix completions in case of inline comments

add support for non-directory sources

automatically add package definition to new source files

automatically insert pipes in multiline string

a lot of miscellaneous fixes

Fix completions in case of inline comments

Previously, completions after a comment and newline would yield no results:

val List ( 1 , 2 , 3 ) .map(num => num + 1 ) @@

This was fixed by the Metals team in the presentation compiler itself for 2.12.9 and 2.13.1, however we also added a workaround for all supported older Scala versions.

Add support for non-directory sources

In case that your build tool supports having single files as sources, we now offer full support for them. That corresponds to the most recent BSP specification request

Automatically add package definition to new source files

For every new Scala file we automatically add package definition based on the relative path between the new source file and source root. This is done using applyWorkspaceEdit method, which causes the change to be done in editor and this can easily be rewerted like any other change you would type.

We also added support for package objects. Whenever you create package.scala file, we will automatically create the barebone definition of the package object.

There is still some work to be done about moving files between packages, which will be addressed in the next release.

Big thanks to the first time contributor from VirtusLab Tomasz Dudzik for implementing most of the functionality! 🎉

Automatically insert pipes in multiline string

We finally managed to properly support adding | in multiline strings using the onTypeFormatting method. Previous implementation was very naive and often added pipes in wrong places.

To enable the functionality you need to enable onTypeFormatting inside your editor if it's not enabled by default.

In Visual Studio Code this needs to be done in settings by checking Editor: Format On Type :

You will also need the newest version of the Visual Studio Code plugin.

There is still some possible improvements in case of copy pasting entire text fragments, but that needs some more work.

Big thanks to another of our first time contributors from VirtusLab Karolina Bogacka! Great work! 🎉

Add support for Scala 2.12.9

Metals now supports Scala 2.12.9! No new Scala version has been deprecated in this release, since it is possible that Scala 2.12.10 version with some important fixes will be released soon.

Big thanks to @gabro for again leading the effort! This took considerably more time and effort than expected.

Miscellaneous fixes

erroneous warning for Scala 2.11 is no longer displayed

don't infer build target for non-readonly files

fix several small issues in the tree view protocol spec

set h2.bindAddress to avoid exposing open ports (thanks @blast-hardcheese!)

resolve symlinks that are used within workspaces

fix issues when import was requested multiple times without any change

detect openjdk as a valid jdk home

warn when java sources were not found

string interpolation completions now work properly in multiline string

add ReloadDoctor to the list of all commands (thanks @kurnevsky!)

add correct mill version in the predef script when running bloopInstall

SemanticDB plugin issues are no longer reported in java only projects

check if SeamnticDB really exists and only report issue when it doesn't

update default scalafmt to 2.0.1

use recommended version for build tools in UI message

fix file leak when importing large Gradle workspaces

Contributors

Big thanks to everybody who contributed to this release, a lot more people joined this time to make the release better!

git shortlog -sn --no-merges v0.7.0..v0.7.2 Gabriele Petronella Tomasz Godzik Páll Geirsson Evgeny Kurnevsky Marek Żarnowski Lucas Satabin Ayoub Benali Chris Birchall Compro Prasad Devon Stewart Martínez Karolina Bogacka Tomasz Dudzik Chris Kipp Rikito Taniguchi

Merged PRs

Full Changelog

Merged pull requests: