diff --git a/modules/lang/scala/config.el b/modules/lang/scala/config.el index c78a23b3f..d42e879db 100644 --- a/modules/lang/scala/config.el +++ b/modules/lang/scala/config.el @@ -22,6 +22,8 @@ (when (modulep! +tree-sitter) (add-hook 'scala-mode-local-vars-hook #'tree-sitter! 'append)) + (set-formatter! 'scalafmt '("scalafmt" "--stdin") :modes '(scala-mode)) + (set-ligatures! 'scala-mode ;; Functional :def "def" diff --git a/modules/lang/scala/doctor.el b/modules/lang/scala/doctor.el index 917a129bd..fc72e2f18 100644 --- a/modules/lang/scala/doctor.el +++ b/modules/lang/scala/doctor.el @@ -11,3 +11,7 @@ (if (and (modulep! +lsp) (not (executable-find "metals"))) (warn! "metals isn't installed")) + +(when (modulep! :editor format) + (unless (executable-find "scalafmt") + (warn! "Couldn't find scalafmt. Formatting will be disabled.")))