Skip to main content

Metals v1.6.1 - Osmium

· 15 min read

We're happy to announce the release of Metals v1.6.1, which further improves MCP support as well as continues to improve the overall stability of using Metals.

Commits since last release91
Merged PRs87
Contributors17
Closed issues27
New features5

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

Metals is a language server for Scala that works with VS Code, Vim, Emacs, Zed, Helix 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!

SQL highlighting

Thanks to Mensh1kov Metals now supports highlighting SQL queries in the editor when sql or fr interpolated strings are used.

sql-highlighting

Model Context Protocol Improvements

The biggest number of improvements in this release are related to MCP support. This includes both new features and overall quality of life improvements.

New features

This release includes two new tools. The first one is a tool to list currently available modules, which helps agents to discover what modules are available to use (kasiaMarek). The second one is a tool to format files, which helps agents to format files in a way that is consistent with the project's style (ckipp01).

Quality of life improvements

Based on feedback from the community, a few quality of life improvements have been added to the MCP tools.

First of all, support for ZIO to the MCP test tool has been added by avshRepo. This allows LLM Agents to run specific tests in ZIO test support. Another improvement in this area is the ability to run specific tests cases added by ckipp01.

Another improvement is related to configuring the MCP server. We now save the MCP server configuration in the workspace settings, so that it's available to all tools that use MCP. This might be useful when connecting to MCP for example multiple LLM tools to use the same port without having to manually configure it.

Moreover, there have been some race conditions when starting Metals in Cursor when the MCP server was not yet ready. We now recreate the MCP server configuration after we are sure that the server is started.

Lastly, this release added support for claude by default again thanks to ckipp01.

For all of you asking to use Metals MCP standalone, there has been some community contributions to make it easier to use Metals MCP standalone. Checkout metals-standalone-client by jpablo for more details.

Updates to fuzzy matcher logic

There has been a number of reports by users that the previous behaviour of fuzzy matching is too strict and caused some completions to be hidden when the case of the first letter is wrong. This has been fixed by ltrojanowski and the new behaviour is now more forgiving.

You can take a look at the details for more information as well as provide us some further feedback.

New X-ray inlay hints

Thanks to henryxparker Metals now supports so called X-ray inlay hints that you might know from IntelliJ. When those inlay hints are enabled you will see the type next to a longer chain of expressions. This is particularly useful when you are working with complex expressions and you want to understand exactly what transformations are taking place.

val transformedList =
List(1, 2, 3)
.map(x => x * 2)/* : List[Int]*/
.map(x => x.toString)/*: List[String]*/
.map(x => x.length)/* : List[Int]*/

Try it out by enabling the metals.inlayHints.hintsXRayMode setting. Let us know what you think!

The feature is currently available only for Scala 2, we will add support for Scala 3 in the near future, but it requires a new version of the Scala 3 compiler.

Miscellaneous

  • bugfix: Run close when stopping the presentation compiler to avoid breaking interactive features in 2.13.x tgodzik
  • improvement: Don't suggest object import in type position tgodzik
  • bugfix: Import object when .type is used tgodzik
  • improvement: Don't ask to restart bloop on Bloop version update tgodzik
  • improvement: Auto detect build target in attach if not specified based on currently focused file tgodzik
  • bugfix: Ignore implicit apply for signature help harpocrates
  • bugfix: Fix completions at the start of the file tgodzik
  • bugfix: Show signature help inside annotation trees harpocrates
  • bugfix: Don't try to find definition for invalid symbols tgodzik
  • improvement: Add an ability to trace mcp requests by creating .metals/mcp.trace.json file tgodzik
  • feature: discover main classes in dependencies when running without debug harpocrates
  • bugfix: pass the environment variables from the BSP server when running tests arturaz
  • improvement: delete old compilation units from pc to reduce memory usage over long sessions kasiaMarek
  • Add support for scala-attach-remote for build servers without in-built DAP support adrien-piquerez-da
  • bugfix: Fix completion before string literal ajafri2001
  • bugfix: Escape $ in shell command tgodzik
  • feature: Use the new fork of Bazel BSP under org.virtuslab.bazel-bsp organization kc-vl
  • feature: Allow users of ZIO test support to run specific suite or suiteAll avshRepo
  • improvement: Add support for running specific tests in scalatest feature specs tmilner
  • bugfix: detect bzl workspace for both WORKSPACE and MODULE.bazel files kc-vl
  • bugfix: Remove stale top level symbols from current run to avoid non existing intermediate symbols with multiple open files tgodzik
  • chore: Don't restart Bloop when properties are uninitialized tgodzik
  • bugfix: Fix missing signature help in superclass constructor zielinsky

Contributors

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

$ git shortlog -sn --no-merges v1.6.0..v1.6.1
30 Tomasz Godzik
23 scalameta-bot
11 Katarzyna Marek
4 Chris Kipp
4 ajafri2001
4 dependabot[bot]
3 Alec Theriault
2 Avshalom Orenstein
2 kc-vl
1 Adrien Piquerez
1 Artūras Šlajus
1 Henry Parker
1 Lukasz Trojanowski
1 Mensh1kov
1 Tom Milner
1 Zieliński Patryk
1 scarf

Merged PRs

v1.6.1 (2025-07-31)

Full Changelog

Merged pull requests: