doomemacs/modules/lang/scala
Henrik Lissner 037b018cdd
feat: add .doommodule files
These optional dotfiles indicate the root of a module or module
group (:lang), and will later contain module metadata. They will also
serve as an alternative to packages.el and doctor.el, and will aide the
parts of the v3.0 module API concerned with resolving the current module
from a path (`doom-module-from-path`), which currently rely too heavily
on parsing path strings.

For now, however, they're simply placeholders.
2024-09-14 20:47:39 -04:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
autoload.el check if buffer exists and not alive before kill 2021-02-20 09:37:55 -05:00
config.el feat(format): add :lang scala formatter 2023-09-13 20:21:00 +01:00
doctor.el feat(format): add :lang scala formatter 2023-09-13 20:21:00 +01:00
packages.el bump: :lang 2024-09-07 19:04:37 -04:00
README.org docs(*): replace all-the-icons with nerd-icons 2023-09-16 20:19:11 +02:00

:lang scala

Description   unfold

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

Maintainers

This module has no dedicated maintainers. Become a maintainer?

Module flags

+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.

Hacks

No hacks documented for this module.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

+lsp Integration

To set up LSP support for Scala you'll need the Metals LSP server. To install it you need Coursier installed first:

Coursier

Coursier is only required to install Metals. If you're on Arch linux this step can be skipped.

Ubuntu / Debian / Fedora
curl -fLo cs https://git.io/coursier-cli-linux &&
    chmod +x cs &&
    ./cs
MacOS
curl -fLo cs https://git.io/coursier-cli-macos &&
    chmod +x cs &&
    (xattr -d com.apple.quarantine cs || true) &&
    ./cs
Arch Linux
yay -S coursier

Metals

Ubuntu / Debian / Fedora / MacOS

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 -f
Arch Linux
yay -S metals

Formatter

Formatting is handled using the doom-module::editor format module via scalafmt.

TODO Usage

󱌣 This module has no usage documentation yet. Write some?

TODO Configuration

󱌣 This module has no configuration documentation yet. Write some?

Troubleshooting

Report an issue?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?