Metals v0.7.5 - Thorium
We are excited to announce the release of Metals v0.7.5 - codename "Thorium" 🎉 The release includes couple of bug fixes for 0.7.2, which were present in some rare scenarios. We also added a new experimental feature, which we would be happy to get feedback about.
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 and VirtusLab along with contributors from the community.
In this release we merged 12 PRs and closed 6 issues, full details: https://github.com/scalameta/metals/milestone/17?closed=1
TL;DR
Check out the website and give Metals a try: https://scalameta.org/metals/
- add auto-fill option to case classes
- deduce values for named parameters completions
- multiple fixes after adding support for Scala 2.12.9
- fixes for automatic addition of
|
in multiline strings
Add auto-fill option to case classes
Whenever we invoke a method and try completions inside the brackets there is an additional option to allow Metals to deduce what should be filled for each parameter.
This algorithm checks if there exists a value in scope with the same type as the parameters' and then works according to the rules below:
1. If there is only one candidate, use it.
2. If there is more than one, give user an alternative to choose one of them.
3. Otherwise use use "???".
This feature also uses the snippets syntax to allow to quickly go over the auto-filled parameters and choose or replace the auto-filled values.
Deduce values for named parameters completions
Leveraging the work that went into the previous feature, we were also able to provide additional support for concrete values in named parameter completions.
We generate completion item for each value that fits the type of the parameter.
Multiple fixes after adding support for Scala 2.12.9
After updating Metals to work with Scala 2.12.9 it turned out that completions and hover didn't work correctly and due to the presentation compiler crashing in the following scenarios:
- whenever an older version of SemanticDB plugin was used as was the case with Mill
- when using Scala 2.12.8 without SemanticDB plugin
Both issues have now been fixed and additionally we updated the default Mill version to 0.5.1, which works correctly with Scala 2.12.9.
|
in multiline strings
Fixes for automatic addition of We now make sure that stripMargin
exists when adding |
automatically in
multiline strings. This could cause issues in some scenarios, where multiline
string contained |
, but it was not only used for formatting.
Additionally, we fixed the feature to also work in interpolated strings, which was missing in the previous release.
Contributors
Big thanks to everybody who contributed to this release!
$ git shortlog -sn --no-merges v0.7.2..v0.7.5
Tomasz Godzik
Gabriele Petronella
Łukasz Byczyński
Olafur Pall Geirsson
Merged PRs
v0.7.5 (2019-09-12)
Merged pull requests:
- Revert sbt version to 1.2.8 #915 (tgodzik)
- Upgrade to latest sbt-sonatype for faster and more stable releases #912 (olafurpg)
- Update with new Eclipse capabilities #911 (mundacho)
- Check for stripMargin when adding | #904 (tgodzik)
- Add additional tips & tricks to the sublime text documentation #906 (LukaszByczynski)
- Update sbt to 1.3.0 #905 (gabro)
- Fix more possible presentation compiler classpath issues #901 (tgodzik)
- Update Mill to 0.5.1 #899 (tgodzik)
- Update website overview and add information about Eclipse #894 (tgodzik)
- Retry with clean compiler after ShutdownReq #898 (tgodzik)
- Add automatic value completions on named arguments #827 (tgodzik)
- Fix links to merged PRs in blogpost #896 (tgodzik)
- Add release notes for v0.7.2 #886 (tgodzik)