Metals v1.1.0 - Silver
We're happy to announce the release of Metals v1.1.0, which brings stability fixes and takes another step towards bettering error detection and error reporting.
Commits since last release | 114 |
Merged PRs | 104 |
Contributors | 13 |
Closed issues | 32 |
New features | 2 |
For full details: https://github.com/scalameta/metals/milestone/60?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 contributors from the community.
TL;DR
Check out https://scalameta.org/metals/, and give Metals a try!
- New Scala versions support
- Build server status
- Enable run code lens for Mill build server
- Convert single line comments to multiline
- Detect project root
- Error reports in metals doctor
- Show bloop errors
- Changes for plugin authors
New Scala versions support
Support for Scala 3.3.1
Scala 3.3.1 is a new version of the Scala 3 LTS and it adds support for JDK 16 records in Java sources.
For more information about the release take a look at https://github.com/lampepfl/dotty/releases/tag/3.3.1
Support for Scala 2.13.12
The main improvement of Scala 2.13.12 are actionable diagnostics. They are compiler suggested fixes for some errors and warnings. Actionable diagnostics are available in metals as code actions coming directly from the compiler.
For more information about the release take a look at https://github.com/scala/scala/releases/tag/v2.13.12
Build server connection status
Since the previous release metals detects and reports when the build server stops responding. Over the last months this feature was stabilized and the information about the build server connection is now visible in the status bar. For clients that don't support this status bar yet, the error message will be displayed as before.
Build server connection status in VSCode, when metals is successfully connected to sbt
build server.
If you are a maintainer of a metals' client and want to know how to add support for build server status see Changes for clients.
Enable run code lens for Mill build server
Thanks to Tomasz Godzik now we have run code lens when using Mill build server. As a reminder, it's possible to start using it by running Metals: Switch build server
command for a Mill project.
Convert single line comments to multiline
Thanks to Kasper Kondzielski we have a new code action that converts a block of single line comments into a multiline comment.
Detect project root
Sometimes your Scala project root is not in the same folder that you open your editor in. Now metals will also detect the Scala project root when it is a child of the workspace/workspace folder root.
. *workspace root*
├── scalaProject *detected project root*
│ ├── .sbt
│ ├── src/main/scala
│ │ ├── Main.scala
│ │ └── ...
│ └── ...
├── someOtherProject
│ └── ...
├── .gitignore
└── ...
Error reports in metals doctor
Error reports are now visible in the metals doctor to help users diagnose the cause of any potential issue. Previously, they would only exist in the .metals/.reports
folder.
Show bloop errors
Before this release Bloop build server errors would only be logged silently into metals.log
and the Metals output. Now for the sake of visibility Bloop errors are also shown to the users in form of error messages. The message can be dismissed for the current session of Metals or you can turn off all messages in a workspace.