Skip to main content

Metals v0.10.5 - Tungsten

· 6 min read

We're happy to announce the release of Metals v0.10.5, which contains a lot of fixes, adds Scala 3.0.1 support, and brings another nice feature!

Commits since last release155
Merged PRs73
Contributors9
Closed issues18
New features1

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

Metals is a language server for Scala that works with VS Code, Vim, Emacs, Sublime Text and Eclipse. Metals is developed at the Scala Center and VirtusLab with the help from Lunatech along with contributors from the community.

TL;DR

Check out https://scalameta.org/metals/, and give Metals a try!

  • Add support for textDocument/selectionRange
  • [Scala 3] Inferred Type code action and other improvements
  • Better support of scalafmt for Scala 3 projects
  • Search symbol references from dependency source in the workspace

Add support for textDocument/selectionRange

Due to the great work by @ckipp01 Metals now implements the textDocument/selectionRange LSP-method. It allows you to easily select an expression and expand/shrink it using shortcut combinations:

gif1

Default keybindings in VSCode:

Win/LinuxmacOS
ExpandShift+Alt+Right⌃⇧⌘→
ShrinkShift+Alt+Left⌃⇧⌘←

[Scala3] Inferred Type code action and other improvements

We're hard at work ensuring that the same feature-set for Scala 2 is available for Scala 3. This release adds support for the Insert Inferred Type code action.

gif2

In addition to other small fixes, it's worth mentioning that the Go to Definition functionality was improved so that in situations where there are compilation issues, you're now able to better navigate to the definition site.

Better support of scalafmt for Scala 3 projects

In order to support different Scala dialects scalafmt added a runner.dialect setting to support Scala 3. Metals will now correctly generate and even automatically upgrade your .scalafmt.conf. Moreover, in projects that contain different Scala major versions Metals will set a separate dialect for each separate source directory.

Search symbol references from dependency source in the workspace

Thanks to @Z1kkurat "Find References" now also works from within your dependency sources to include references from all workspace sources. Previously, it included only local occurrences in the dependency source file.

gif3

Miscellaneous

  • Fixed issues with Metals client still running after closing window
  • Fixed indexing of Scala 3 libraries that include macros
  • Fixed issues with breakpoints not stopped when using optional braces
  • Print type decorations for synthetic apply
  • Wrap autofilled arguments with backticks
  • Don't offer to organize imports when there is an error in the file

Contributors

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

$ git shortlog -sn --no-merges v0.10.4..v0.10.5
22 Chris Kipp
18 Vadim Chelyshov
17 Tomasz Godzik
2 Adrien Piquerez
2 Luigi Frunzio
2 Kamil Podsiadło
1 Z1kkurat

Merged PRs

v0.10.5 (2021-07-12)

Full Changelog

Merged pull requests: