feat(format): add :lang scala formatter
This commit is contained in:
parent
caa6b2bb3b
commit
3c96f33cb8
2 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,8 @@
|
||||||
(when (modulep! +tree-sitter)
|
(when (modulep! +tree-sitter)
|
||||||
(add-hook 'scala-mode-local-vars-hook #'tree-sitter! 'append))
|
(add-hook 'scala-mode-local-vars-hook #'tree-sitter! 'append))
|
||||||
|
|
||||||
|
(set-formatter! 'scalafmt '("scalafmt" "--stdin") :modes '(scala-mode))
|
||||||
|
|
||||||
(set-ligatures! 'scala-mode
|
(set-ligatures! 'scala-mode
|
||||||
;; Functional
|
;; Functional
|
||||||
:def "def"
|
:def "def"
|
||||||
|
|
|
@ -11,3 +11,7 @@
|
||||||
(if (and (modulep! +lsp)
|
(if (and (modulep! +lsp)
|
||||||
(not (executable-find "metals")))
|
(not (executable-find "metals")))
|
||||||
(warn! "metals isn't installed"))
|
(warn! "metals isn't installed"))
|
||||||
|
|
||||||
|
(when (modulep! :editor format)
|
||||||
|
(unless (executable-find "scalafmt")
|
||||||
|
(warn! "Couldn't find scalafmt. Formatting will be disabled.")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue