This module adds scala and sbt support to Doom Emacs.
Through the power of Metals (LSP) this module offers:
- Goto Definition
- Completions
- Hover
- Paremeter Hints
- Find References
- Run/Debug
- Find Implementations
- Rename Symbol
- Code Actions
- Document Symbols
- Formatting
- Folding
- Organize Imports
This module has no dedicated maintainers. Become a maintainer?
- +lsp
-
Enable LSP support for
scala-mode
. Requires doom-module::tools lsp and a langserver (supports metals). - +tree-sitter
- Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter.
- doom-package:sbt-mode
- doom-package:scala-mode
- doom-package:lsp-metals if doom-module:+lsp
No hacks documented for this module.
This module does not have a changelog yet.
Enable this module in your doom!
block.
To set up LSP support for Scala you’ll need the Metals LSP server. To install it you need Coursier installed first:
Coursier is only required to install Metals. If you’re on Arch linux this step can be skipped.
curl -fLo cs https://git.io/coursier-cli-linux &&
chmod +x cs &&
./cs
curl -fLo cs https://git.io/coursier-cli-macos &&
chmod +x cs &&
(xattr -d com.apple.quarantine cs || true) &&
./cs
yay -S coursier
Update following command to latest version of metals found here.
coursier bootstrap \
--java-opt -Xss4m \
--java-opt -Xms100m \
--java-opt -Dmetals.client=emacs \
org.scalameta:metals_2.12:0.9.4 \
-r bintray:scalacenter/releases \
-r sonatype:snapshots \
-o /usr/local/bin/metals-emacs -f
yay -S metals
🔨 This module has no usage documentation yet. Write some?
🔨 This module has no configuration documentation yet. Write some?
Report an issue?
- Projects are required to have scala version
2.11.12
,2.12.8
,2.13.0
or greater. - Latest version of sbt is recommended.
- Running
M-x lsp-metals-doctor-run
helps diagnose problems. - Full reference here: https://scalameta.org/metals/docs/editors/emacs.html
This module has no FAQs yet. Ask one?
🔨 This module has no appendix yet. Write one?