IDE-like features for Scala in Visual Studio Code - powered by scalavista-server
The most lightweight, easy-to-use, yet feature-rich
VS Code extension for the Scala language:
Scala versions 2.11, 2.12, 2.13 are currently supported.
The extension is a front-end to the scalavista-server
language server. It is very lightweight: no databases are created, no builds are imported.
Java (version 8 or greater): make sure you have java
on your PATH
or JAVA_HOME
in your environment.
Install this extension from the Marketplace.
Open the root of your project as a workspace.
The extension is activated upon opening any Scala source file (*.scala
).
On every activation the extension will query GitHub for the
latest release
of the scalavista-server
jars.
If a more recent version is found, the user is asked to allow downloading.
Finally, the extension will launch a language server instance as a subprocess.
This may take a few seconds (or longer if dependencies are
resolved for the first time).
If your project has external dependencies or you want to
pass flags to the Scala compiler, simply create
a scalavista.json
file at the root of your project (workspace).
Here is a basic example:
{
"scalaBinaryVersion": "2.12",
"dependencies": [
"io.circe:circe-core_2.12:0.11.1",
"io.circe:circe-generic_2.12:0.11.1",
"io.circe:circe-parser_2.12:0.11.1"
],
"scalacOptions": [
"-deprecation",
"-feature",
"-Ywarn-dead-code"
]
}
Have a look here for more details.
If you enjoy using this extension, please star this project on GitHub or leave a good rating on the Marketplace. Thank you!