- Scala
- Scala language support
- 15 Installs
-
This extension is allowed to:
- Read & Write Files
- Launch Subprocesses
- Send Network Requests
Readme
Scala provides syntax highlighting and autocompletion for the Scala language using the Metals language server.
This extension requires Coursier to be installed and on the system path: https://get-coursier.io/
Language Support
Supported Features:
- Syntax highlighting
- Go-to definition
- Hover documentation
- JDK selection
- Metals commands: "import build", "connect to build server", "switch build server", "restart build server", "disconnect from build server", "cascade compile", "clean compile", "cancel compilation", "reset workspace", and "list build targets"
Workspace Configuration
Java Home
By default, the JAVA_HOME
configured on the system path is used to install and
run Metals.
When the Java Home
workspace configuration option is set to a local JDK
folder, that path will be used in place of JAVA_HOME
and Metals will be
re-installed and restarted with it instead.
If the project targets Java 8, it can be useful for the Workspace "Java Home" setting to be Java 17 as Metals might not support Java 8 anymore.
Command Palette Reference
Metals: Import build
Imports the latest changes from the build. For example, this command pulls in the latest library dependencies. Run this command if the project feels unresponsive or if the build has been re-configured.
Metals: Update
Updates the Metals tool installed with this extension to the latest version.
Metals: Doctor
Opens the Metals doctor diagnostics page in the default web browser.
Metals: Switch build server
Provides a prompt to switch the underlying build server.
Metals: Connect to build server
Creates a new connection to the build server. Useful when documentation of go-to feels unresponsive.
Metals: Cancel compilation
Cancels any ongoing compilations.
Metals: Cascade compile
Compiles the open files and any files dependent on open files.
Metals: Clean compile
Recompiles all build targets in the workspace.
Metals: Reset notifications
Resets any dismissed notifications so that choices can be made again.
Metals: Restart build server
Stops and restart the current running build server.
Metals: Disconnect from old build server
Cancels the existing build server connection.
Metals: Reset workspace
Cleans the Metals cache and restarts the build server. If a project is not responding to hover or go-to and the "Metals: Import Build" command didn't help, this command can fully reset Metals for this project.
Metals: List build targets
Lists Metals build targets in the workspace using a notification.