Skip to main content

Metals v1.6.5 - Osmium

· 18 min read

We're happy to announce the release of Metals v1.6.5, which brings several exciting new features including completions for implicit classes, auto imports for Java, Type Hierarchy support, and an updated MCP server implementation.

Commits since last release110
Merged PRs110
Contributors16
Closed issues43
New features3

For full details: https://github.com/scalameta/metals/milestone/84?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!

Completions for implicit classes

Metals can now suggest methods from implicit classes that are not yet imported in your code. When you type a method that could come from an implicit class in your workspace or dependencies, Metals will show these completions with an (implicit) label and automatically add the necessary import when you accept the completion.

For example, if you want to use the millisecond method from scala.concurrent.duration package, typing 2.mill will now suggest millisecond from DurationInt and add import scala.concurrent.duration.DurationInt when selected. This also works for implicit classes defined in your own workspace - if you define implicit class MyIntOps(n: Int) with a myDouble method, you can use it anywhere in your project and Metals will handle the import automatically.

Thanks to pielas for implementing this feature!

Add auto imports for Java

Metals now supports auto imports for Java files! When you use a class that isn't imported yet, Metals will suggest the import and automatically add it for you when you accept the completion. Metals won't add duplicate imports and properly handles wildcard imports (e.g., java.util.*). If there's a naming conflict with an existing import, Metals will insert the fully qualified class name instead.

Thanks to zielinsky for working on this!

Switch to streamable HTTP standard

The Metals MCP server has been updated to use the new streamable HTTP transport standard. This change brings the MCP implementation in line with the latest MCP specification and improves compatibility with various MCP clients.

What changed: The MCP server endpoint has been changed from /sse (Server-Sent Events) to /mcp. For some users with common editors like Cursor, VS Code, or Claude, Metals will automatically rewrite your existing configuration to use the new endpoint when you start the MCP server.

Manual migration: If you have a custom MCP client configurations, you'll need to update the URL from http://localhost:<port>/sse to http://localhost:<port>/mcp. Metals will attempt to detect and update configurations automatically, but if you maintain your own setup, please update accordingly.

Implement Type Hierarchy support

Metals now supports the LSP Type Hierarchy feature, allowing you to explore class inheritance relationships directly from your editor. This feature provides three capabilities:

  • Prepare Type Hierarchy: When you place your cursor on a class, trait, object, or type, you can request to see its type hierarchy.
  • Supertypes: Navigate upward in the inheritance tree to see parent classes and implemented traits. For example, selecting Dog will show you Animal and AnyRef if Dog extends Animal.
  • Subtypes: Navigate downward to discover all classes that extend or implement the selected type.

This feature works across your entire project, including dependencies stored in JAR files. The type hierarchy information is indexed and stored in a database for fast lookups.

To use this feature, look for "Show Type Hierarchy" or similar commands in your editor (the exact UI depends on your editor's LSP support).

Thanks to warcholjakub for implementing this feature!

Incoming Metals 2

We are currently testing and working on new Metals 2, which is a major overhaul of how Metals works. The main intention is to make it much better for larger monorepo setups as well as improve user experience even if your codebase is not compiling.

Take a look at the new Metals 2 website for more information.

We don not have a release date yet, but we want to make sure that all the features available in Metals 1 are available in Metals 2.

Miscellaneous

  • bugfix: Filter out invalid multiline comment fold ranges (discapes)
  • bugfix: Correct autoImportBuilds config key name (jklukas)
  • improvement: Support build.mill.yaml build files lolgab
  • bugfix:Fix script definition URIs to point to original .sc files (zielinsky)
  • improvement: Use mill scripts if available in the workspace (tgodzik)
  • improvement: Support inspecting Java generic types in MCP (warcholjakub)
  • bugfix: SQL syntax highlighting in complex cases (warcholjakub)
  • bugfix: Fix SQL highlighting for nested interpolators #8047 (Mensh1kov)
  • improvement:Make Metals look for ./mill and ./mill.bat files when identifying Mill projects lihaoyi
  • improvement: Show a warning when newer -release version flag is used (tgodzik)
  • bugfix: ZIO test explorer reveals sub-tasks with provideLayer (krrish175-byte)
  • improvement: Add memory usage warning when heap is nearly full (krrish175-byte)
  • bugfix: Inline value false-positive shadowing with lambda params (krrish175-byte)
  • Fix: Handle InvalidSymbolException in StacktraceAnalyzer (#7974) (krrish175-byte)
  • improvement: Use jar based coursier as a fallback when not available in PATH (tgodzik)
  • improvement: Compile only JVM targets by default when not focusing on Native and JS specific files. (warcholjakub)
  • improvement: Forward credentials to Bloop process (krrish175-byte)
  • bugfix: Fix inlining interpolated variables #8108 (johndoknjas)
  • bugfix: Fix MCP server identification for multi-project workspaces (krrish175-byte)

Contributors

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

$ git shortlog -sn --no-merges v1.6.4..v1.6.5
42 scalameta-bot
33 Tomasz Godzik
12 dependabot[bot]
4 Jakub Warchoł
7 Krrish Biswas
2 Jeff Klukas
2 Zieliński Patryk
1 John Doknjas
1 Jonathan Burns
1 Li Haoyi
1 Lorenzo Gabriele
1 Mateusz Piękos
1 Mensh1kov
1 Miika Tuominen
1 Russ White

Merged PRs

v1.6.5 (2026-01-20)

Full Changelog

Merged pull requests: