doomemacs/modules/lang/scala
2020-10-27 09:28:11 -04:00
..
autoload.el Conform scala comment function to naming conventions 2020-02-25 20:47:37 -05:00
config.el Disable lsp indentation in scala mode 2020-10-27 09:28:11 -04:00
doctor.el lang/scala: replace ensime with metals 2019-10-02 10:38:11 +03:00
packages.el Fix user-defined flycheck-checker in lsp-mode 2020-10-20 16:51:39 -04:00
README.org Add scala module documentation 2020-10-15 15:22:41 -04:00

lang/scala

Description

This module adds scala and sbt support to Doom Emacs.

Module Flags

  • +lsp Enables integration for the metals LSP server.

+lsp Integration

Prerequisites

Coursier

Note: Coursier is only required to install Metals. If system is running arch linux this step can be safely 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
yay -S coursier

Metals

Ubuntu / Debian / Fedora / MacOS

Note: 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
Arch
yay -S metals

Features

According to https://scalameta.org/metals/docs/editors/overview.html it adds

  • Goto Definition
  • Completions
  • Hover
  • Paremeter Hints
  • Find References
  • Run/Debug
  • Find Implementations
  • Rename Symbol
  • Code Actions
  • Document Symbols
  • Formatting
  • Folding
  • Organize Imports

Notes