Metals

Metals

  • Docs
  • Blog
  • GitHub

›All Blog Posts

All Blog Posts

  • Metals v0.10.0 - Tungsten
  • A Metals Retrospective (Part 1)
  • Metals v0.9.10 - Lithium
  • Metals v0.9.8 - Lithium
  • Metals v0.9.7 - Lithium
  • Metals v0.9.6 - Lithium
  • Metals v0.9.5 - Lithium
  • sbt BSP support
  • Metals v0.9.4 - Lithium
  • Metals v0.9.3 - Lithium
  • A Dive into Configuring Metals
  • Metals v0.9.2 - Lithium
  • Metals v0.9.1 - Lithium
  • Metals v0.9.0 - Lithium
  • Metals v0.8.4 - Cobalt
  • Metals v0.8.3 - Cobalt
  • Metals v0.8.1 - Cobalt
  • Metals v0.8.0 - Cobalt
  • Metals v0.7.6 - Thorium
  • Metals v0.7.5 - Thorium
  • Metals v0.7.2 - Thorium
  • Metals v0.7.0 - Thorium
  • Metals v0.6.1 - Radium
  • Metals v0.5.1 - Mercury
  • Metals v0.5.0 - Mercury
  • Metals v0.4.4 - Tin
  • Metals v0.4.0 - Tin
  • Low-memory symbol indexing with bloom filters
  • Metals v0.3.2 - Iron
  • Fast goto definition with low memory footprint
  • Metals v0.3 - Iron

Metals v0.9.3 - Lithium

August 19, 2020

Tomasz Godzik

Tomasz Godzik

We're happy to announce the release of Metals v0.9.3, which adds a couple of useful new features as well as support for Scala 0.25.0 and 0.26.0-RC1.

Commits since last release 123
Merged PRs 59
Contributors 9
Closed issues 31
New features 3

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

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

  • sbt script support with hover, completions and go to definition.
  • Scala 3 worksheet support
  • Scala 0.25.0 and 0.26.0-RC1 support.
  • Main classes from dependencies can now be run

sbt script support

Thanks to the great work by dos65 Metals now supports sbt script files as well as build's Scala files. The full list of currently supported features is available here.

sbt support is is achived by generating additional metals.sbt file for each level of sbt's project. For build.sbt we now generate project/project/metals.sbt, for project/other.sbt project/project/project/metals.sbt etc. This is needed for the Bloop plugin to properly generate information in the .bloop configuration files. It's recommended to gitignore metals.sbt and .bloop anywhere in the file tree.

Scala 3 worksheet support

Finally, it is now possible to run worksheets for Scala 3 starting with version 0.26.0-RC1. To try it out users need to create the worksheet inside of a Scala 3 source directory and then they can be used the same way as with previously supported worksheets.

This is a great place for anyone to experiment with Scala 3 and see what is coming around the corner!

worksheet-sample

Running main classes from dependencies

Previously, users could only run main classes that are defined in the sourcecode, which made it impossible to run and debug in certain frameworks such as the Play Framework. Metals now searches the classpath additionally to find any classes that are defined by the user and not available in the main sources.

To run any such class a full name needs to be provided via the configuration.

For example in Visual Studio Code this would look like this:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "scala",
      "request": "launch",
      "name": "Play main",
      "mainClass": "play.core.server.ProdServerStart",
      "buildTarget": "root",
      "args": [],
      "jvmOptions": []
    }
  ]
}

In other editors users need to provide the same parameters for the run configuration.

Miscellaneous

  • Removed breakpoints are no longer hit.
  • Compilation is invoked only once for any change.
  • Worksheets now display types next to the code.
  • Fixed wrong completions in string interpolation.
  • Bloop now copies old artifacts by default even if the workspace does not compile.
  • Fixed duplicate code actions in case of range selection.
  • Fixed metals.enableStripMargin option to work without restarting the workspace.
  • Signature help now also triggers when typing ,

Contributors

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

$ git shortlog -sn --no-merges v0.9.2..v0.9.3
Tomasz Godzik
Scala Steward
Chris Kipp
Cheng Lian
Vadim Chelyshov
Adrien Piquerez
Ayoub Benali
Krzysztof Bochenek
Olafur Pall Geirsson

Merged PRs

v0.9.3 (2020-08-19)

Full Changelog

Merged pull requests:

  • Document how to run or debug applications #2005 (tgodzik)
  • Properly detect semanticdb target for Scala 3 #2004 (adpi2)
  • Add try/catch around unsafe code block. #2002 (olafurpg)
  • Allow to remove all breakpoints when debugging #1992 (tgodzik)
  • Update information about Sbt, Ammonite and worksheet support #1994 (tgodzik)
  • Update munit, sbt-munit to 0.7.11 #2000 (scala-steward)
  • Make sure we don't compile twice for open files #1993 (tgodzik)
  • Update sbt-mdoc to 2.2.5 #2001 (scala-steward)
  • Update jol-core to 0.12 #1999 (scala-steward)
  • Update flyway-core to 6.5.4 #1998 (scala-steward)
  • Update ammonite-util to 2.2.0 #1997 (scala-steward)
  • Update jackson-databind to 2.11.2 #1996 (scala-steward)
  • Update sbt-buildinfo to 0.10.0 #1995 (scala-steward)
  • Add types to worksheet values #1990 (tgodzik)
  • Allow running main classes from dependencies #1989 (tgodzik)
  • Add support for Sbt's Scala files #1988 (tgodzik)
  • Don't run worksheets on Scala 0.25.0 or lower #1986 (tgodzik)
  • Fix go to defintion for Sbt's Scala sources #1984 (tgodzik)
  • Add in a few missing docs on the extensions and commands. #1980 (ckipp01)
  • Change hardcoded $(info) icon to read from ClientConfig instead. #1982 (ckipp01)
  • Add support for worksheets in Scala 3 #1979 (tgodzik)
  • Simplify logic to add metals.sbt files and make sure it's tested #1978 (tgodzik)
  • Add checking exact name to all references() invocations #1976 (tgodzik)
  • Adjust locations returned from the presentation compiler #1972 (tgodzik)
  • Sbt support - multiply bsp connections #1865 (dos65)
  • Fix filterText value for completion item in string interpolation #1949 (dos65)
  • Add CleanCompile to server commands documentation #1970 (kpbochenek)
  • Change implicits to Dotty syntax. #1967 (ckipp01)
  • Bump recommended scalafmt version and local scalafmt version to 2.6.4 #1968 (ckipp01)
  • Update ammonite-util to 2.1.4-13-fb16e4e #1955 (scala-steward)
  • Update directory-watcher to 0.10.0 #1961 (scala-steward)
  • Update flyway-core to 6.5.3 #1962 (scala-steward)
  • Bump default mill version and also add it to BuildInfo #1954 (ckipp01)
  • Update sbt-munit to 0.7.10 #1964 (scala-steward)
  • Update jol-core to 0.11 #1963 (scala-steward)
  • Update ammonite-runner to 0.3.0 #1960 (scala-steward)
  • Update coursier to 2.0.0-RC6-24 #1959 (scala-steward)
  • Update ujson to 1.2.0 #1958 (scala-steward)
  • Update requests to 0.6.5 #1957 (scala-steward)
  • Update pprint to 0.6.0 #1956 (scala-steward)
  • Update Bloop version to support broken workspaces #1953 (tgodzik)
  • Update Scala 3 version to 0.26.0-RC1 #1951 (tgodzik)
  • Enable BuildInfo for mtags3 #1950 (ckipp01)
  • Fix duplicated code actions #1947 (tgodzik)
  • Fix enableStripMargin setting #1946 (tgodzik)
  • Mark BillLspSuite.automatic-reconnect as flaky #1942 (tgodzik)
  • Add more documentation about worksheets. #1945 (ckipp01)
  • Add in blog post about configuring Metals. #1940 (ckipp01)
  • Add in , as a trigger for SignatureHelp. #1944 (ckipp01)
  • Update to Scala 3 to 0.25.0 version #1939 (tgodzik)
  • Add -Ximport-suggestion-timeout 0 to the presentation compiler options #1938 (tgodzik)
  • Add missing docs and move versions to a more prominent location. #1934 (tgodzik)
  • Take into account server property in statusBarState #1937 (ayoub-benali)
  • Update organize-imports to 0.4.0 #1933 (liancheng)
  • Add Bloop jvmopts in tests to limit memory used by it #1930 (tgodzik)
  • Make sure a file exists when searching for definition #1929 (tgodzik)
  • Reverting "Update interface to 0.0.24 (#1918)" #1928 (tgodzik)
  • Add additional warn-unused flags #1911 (tgodzik)
  • Add release notes for Metals 0.9.2 #1915 (tgodzik)
Recent Posts
  • TL;DR
  • sbt script support
  • Scala 3 worksheet support
  • Running main classes from dependencies
  • Miscellaneous
  • Contributors
  • Merged PRs
  • v0.9.3 (2020-08-19)
Metals
Overview
Text EditorsBuild ToolsProject GoalsContributing
Editors
Visual Studio CodeVimSublime TextEmacsEclipse
Social
Copyright © 2021 Metals