Scala provides syntax highlighting and LSP support for the Scala programming language. It uses Metals, the LSP server for Scala.
The syntax highlighting is currently very basic.
Metals must be installed, which is usually done using the Coursier CLI:
cs install metals
This extension should start automatically whenever a .scala
or .sc
file is edited.
To configure global preferences, open Extensions → Extension Library... then select Scala's Preferences tab.
You can also configure preferences on a per-project basis in Project → Project Settings...
There are two preferences that can be set:
- The path to the metals executable, which defaults to the standard location used by Coursier
- The path to JDK home, which defaults to the value of the
JDK_HOME
environment variable, if it is set
The extension uses:
- The Scala tree-sitter grammar
- The tree-sitter queries from the Metals plugin for Zed