Metals v1.6.1 - Osmium
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 release | 91 |
Merged PRs | 87 |
Contributors | 17 |
Closed issues | 27 |
New features | 5 |
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
- Model Context Protocol Improvements
- Updates to fuzzy matcher logic
- New X-ray inlay hints
- Miscellaneous
SQL highlighting
Thanks to Mensh1kov Metals now supports highlighting SQL queries in the editor when sql
or fr
interpolated strings are used.
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)
Merged pull requests:
- chore: Update bloop and scala-debug adapter #7671 (tgodzik)
- bugfix: Fix worksheets when best effort flag is present #7675 (tgodzik)
- This is a WAY better attempt at X-ray mode. #7639 (henryxparker)
- feat: add in
testName
to the test tool #7665 (ckipp01) - feat: introduce a format-file MCP tool #7659 (ckipp01)
- Fix missing signature help in superclass constructor #7655 (zielinsky)
- chore: Don't restart Bloop when properties are uninitialized #7661 (tgodzik)
- chore: [skip-ci] Remove outdated entires #7663 (tgodzik)
- build(deps): Update flyway-core from 11.10.3 to 11.10.4 #7657 (scalameta-bot)
- build(deps): Update mill-contrib-testng from 0.12.14 to 1.0.0 #7635 (scalameta-bot)
- bugfix: Use toAbsolutePathSafe in symbol search #7654 (tgodzik)
- bugfix: Remove stale top level symbols from current run #7631 (tgodzik)
- bugfix: Make sure ReportContext is initialized before indexes #7651 (tgodzik)
- bugfix: Only run Mill Bloop tests in pre 1.0.0 Mill #7650 (tgodzik)
- fix: detect bzl workspace for both WORKSPACE and MODULE.bazel files #7640 (kc-vl)
- build(deps): Update scribe, scribe-file, scribe-slf4j2 from 3.16.1 to 3.17.0 #7649 (scalameta-bot)
- build(deps): Update jackson-databind from 2.19.1 to 2.19.2 #7648 (scalameta-bot)
- build(deps): Update flyway-core from 11.10.2 to 11.10.3 #7646 (scalameta-bot)
- build(deps): Update cli_3, scala-cli-bsp from 1.8.3 to 1.8.4 #7647 (scalameta-bot)
- fix(mcp): ensure you use serverEntry if it exists to read the port #7645 (ckipp01)
- build(deps): Update semanticdb-java from 0.10.4 to 0.11.0 #7636 (scalameta-bot)
- build(deps): Update flyway-core from 11.10.1 to 11.10.2 #7637 (scalameta-bot)
- build(deps): Update mdoc-interfaces from 2.7.1 to 2.7.2 #7638 (scalameta-bot)
- Add ZIO Support to MCP test tool #7632 (avshRepo)
- bugfix: Use the current version when publishing docs #7633 (tgodzik)
- Improvement: Support for scalatest feature specs #7512 (tmilner)
- Fix ZIO test support bug #7624 (avshRepo)
- bugfix: Only recreate mcp entry for cursor #7628 (tgodzik)
- build(deps): Update sbt, scripted-plugin from 1.11.2 to 1.11.3 #7626 (scalameta-bot)
- build(deps): Update directories, directories-jni from 0.1.3 to 0.1.4 #7625 (scalameta-bot)
- bugfix: Recreate mcp json configuration after restart #7595 (tgodzik)
- feat: use org.virtuslab.bazel-bsp 4.0.0-M3 #7617 (kc-vl)
- bugfix: Escape $ in shell command #7619 (tgodzik)
- feat: add imports on Metals paste #7542 (kasiaMarek)
- build(deps): Update flyway-core from 11.10.0 to 11.10.1 #7620 (scalameta-bot)
- bugfix: check if pos is within range #7596 (ajafri2001)
- improvement: Don't throw when unable to get docstrings, just show empty #7618 (tgodzik)
- refactor: add support for claude #7602 (ckipp01)
- build(deps): Update scalameta, semanticdb-metap, ... from 4.13.7 to 4.13.8 #7603 (scalameta-bot)
- bugfix: Try and fix flakiness for Mill tests #7615 (tgodzik)
- bugfix: Fix signature help issue if .tpe is null #7614 (tgodzik)
- improvement: Upload any reports directories found #7592 (tgodzik)
- build(deps): bump @docusaurus/core from 3.8.0 to 3.8.1 in /website #7612 (dependabot[bot])
- build(deps): bump react and react-dom in /website #7613 (dependabot[bot])
- Add support for
scala-attach-remote
inDebugProvider
#7576 (adrien-piquerez-da) - build(deps-dev): bump @types/node from 22.15.29 to 24.0.8 in /website #7610 (dependabot[bot])
- fix:
require
in MCP schemas #7604 (kasiaMarek) - docs: update Metals contributing docs [skip ci] #7297 (kasiaMarek)
- bugfix: Make sure we don't throw when reading workspace files #7600 (tgodzik)
- improvement: delete old compilation units from pc #7506 (kasiaMarek)
- build(deps): Update flyway-core from 11.9.2 to 11.10.0 #7597 (scalameta-bot)
- build(deps): Update jsoup from 1.20.1 to 1.21.1 #7598 (scalameta-bot)
- build(deps): Update cli_3, scala-cli-bsp from 1.8.1 to 1.8.3 #7599 (scalameta-bot)
- Update fuzzy matcher logic to allow for slightly more forgiving matching #7570 (ltrojanowski)
- fix: pass the environment variables from the BSP server when running tests #7544 (arturaz)
- fix: correctly remove from previously compiled map #7593 (kasiaMarek)
- bugfix: Don't connect to Bloop even if bsp json file is missing #7566 (tgodzik)
- feat: mcp list modules #7549 (kasiaMarek)
- feat: discover main classes in dependencies #7590 (harpocrates)
- improvement: Add an ability to trace mcp requests #7584 (tgodzik)
- build(deps): Update flyway-core from 11.9.1 to 11.9.2 #7586 (scalameta-bot)
- bugfix: Don't try to find definition for invalid symbols #7585 (tgodzik)
- chore: Add Scala version field to GitHub template #7548 (kasiaMarek)
- fix: signature help inside annotation trees #7579 (harpocrates)
- bugfix: Fix completions at the start of the file #7577 (tgodzik)
- fix: ignore implicit apply for signature help #7578 (harpocrates)
- improvement: Auto detect build target in attach if not specified #7277 (tgodzik)
- bugfix: Don't create report if we aren't at a resolvable symbol #7574 (tgodzik)
- build(deps): Update scalameta, semanticdb-metap, ... from 4.13.6 to 4.13.7 #7569 (scalameta-bot)
- bugfix: Run verbose compilation correctly #7571 (tgodzik)
- build(deps): Update jackson-databind from 2.19.0 to 2.19.1 #7568 (scalameta-bot)
- build(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /website in the npm_and_yarn group #7565 (dependabot[bot])
- improvement: Don't ask to restart bloop on update #7552 (tgodzik)
- bugfix: Import object when .type is used #7563 (tgodzik)
- improvement: Don't suggest object import in type position #7561 (tgodzik)
- Add debug to fix flaky test #7517 (kasiaMarek)
- bugfix: Fix issues on Windows #7558 (tgodzik)
- build(deps): Update sbt, scripted-plugin from 1.11.1 to 1.11.2 #7557 (scalameta-bot)
- feat: sql highlighting #7467 (Mensh1kov)
- chore: Remove workaround that removed -release flag for 2.13 #7551 (tgodzik)
- chore: gitignore
.cursor
#7553 (kasiaMarek) - chore: fix typo #7555 (scarf005)
- build(deps): Update flyway-core from 11.8.2 to 11.9.1 #7545 (scalameta-bot)
- build(deps): Update cli_3, scala-cli-bsp from 1.8.0 to 1.8.1 #7547 (scalameta-bot)
- build(deps): Update sbt, scripted-plugin from 1.11.0 to 1.11.1 #7546 (scalameta-bot)
- bugfix: Run close when stopping the presentation compiler #7543 (tgodzik)
- docs: release notes for Metals 1.6.0 #7539 (kasiaMarek)