Metals v0.4.4 - Tin
Metals is a language server for Scala that works with VS Code, Atom, Vim, Sublime Text and Emacs. Metals is developed at the Scala Center along with contributors from the community.
Metals server
In this milestone we merged 5 PRs, full details: https://github.com/scalameta/metals/milestone/5?closed=1.
Improved code navigation
Several "goto definition" and "find references" bugs have been fixed in this release. In particular, code navigation should work more reliably now for the following language features
- for comprehensions with multiple assignments and guards
- eta-expanded methods and functions passed as values
- val patterns like
val (a, b) = ...
- named arguments in
apply
methods - repeated parameter types (varargs)
Empty source directories are no longer created
Previously, Metals created all source directories like src/main/java
and
src/main/scala-2.12
even if they were unused. Now, Metals still creates these
directories but removes them again after the file watcher has started. Big
thanks to first-time contributor @mudsam for
implementing this fix!
Multiple workspace folders
Metals now looks for .scalafmt.conf
in all workspace folders instead of only
the workspace root.
Avoid metals.sbt
compile errors on old sbt versions
The generated metals.sbt
file in ~/.sbt/0.13/plugins/metals.sbt
now compiles
on all versions of sbt 0.13.x even if Metals itself still only works with sbt
0.13.17+.
Visual Studio Code
The Metals extension was installed over 1000 times over the past week!
JAVA_OPTS
The Metals extension now respects the JAVA_OPTS
environment variable the same
it does the .jvmopts
file. For example, set JAVA_OPTS
to
-Dhttps.proxyHost=… -Dhttps.proxyPort=…
to configure HTTP proxies. It's
recommended to start VS Code with the code
binary from the terminal to ensure
environment variables propagate correctly.
Sublime Text
There's a WIP pull request
tom654/LSP#501 adding support for
fuzzy symbol search (workspace/symbol
). Please upvote with 👍 if you'd like to
use this feature!
Emacs
There is a new Gitter channel rossabaker/lsp-scala for Emacs and Metals users.
The lsp-scala
package is now published to MELPA
melpa/melpa#5868.
Merged PRs
- Upgrade to Bloop v1.2.5 #513 (olafurpg)
- Respect workspace folders for Scalafmt formatting, fixes #509. #512 (olafurpg)
- Fix navigation bug for var setters. #511 (olafurpg)
- Upgrade to Scalameta v4.1.3. #510 (olafurpg)
- Change behavior of FileWatcher so that it doesn't create non-existing source directories #506 (mudsam)
- Reference pluginCrossBuild via reflection to support older sbt 0.13. #505 (olafurpg)