Emacs Scala IDE using lsp-mode to connect to Metals.
An example to setup lsp-metals
using use-package
:
(use-package lsp-metals
:ensure t
:custom
;; Metals claims to support range formatting by default but it supports range
;; formatting of multiline strings only. You might want to disable it so that
;; emacs can use indentation provided by scala-mode.
(lsp-metals-server-args '("-J-Dmetals.allow-multiline-string-formatting=off"))
:hook (scala-mode . lsp))