项目作者: buntec

项目描述 :
IDE-like features for Scala in Visual Studio Code - powered by scalavista-server
高级语言: JavaScript
项目地址: git://github.com/buntec/vscode-scalavista.git
创建时间: 2018-12-26T16:11:00Z
项目社区:https://github.com/buntec/vscode-scalavista

开源协议:MIT License

下载


vscode-scalavista

marketplace
GitHub start

The most lightweight, easy-to-use, yet feature-rich
VS Code extension for the Scala language:

  • show type on hover;
  • show fully qualified name on hover;
  • show Scaladoc on hover;
  • auto-completion;
  • jump to definition (within the project);
  • linting (compiler errors/warnings show up as you type).

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.

Prerequisites

Java (version 8 or greater): make sure you have java on your PATH or JAVA_HOME in your environment.

Install

Install this extension from the Marketplace.

Usage

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:

  1. {
  2. "scalaBinaryVersion": "2.12",
  3. "dependencies": [
  4. "io.circe:circe-core_2.12:0.11.1",
  5. "io.circe:circe-generic_2.12:0.11.1",
  6. "io.circe:circe-parser_2.12:0.11.1"
  7. ],
  8. "scalacOptions": [
  9. "-deprecation",
  10. "-feature",
  11. "-Ywarn-dead-code"
  12. ]
  13. }

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!