mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
feat(format): add :lang erlang formatter
This commit is contained in:
@ -5,6 +5,8 @@
|
|||||||
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
||||||
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode)
|
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode)
|
||||||
:config
|
:config
|
||||||
|
(when (executable-find "efmt")
|
||||||
|
(set-formatter! 'efmt '("efmt" "-") :modes '(erlang-mode)))
|
||||||
(when (modulep! +lsp)
|
(when (modulep! +lsp)
|
||||||
(add-hook 'erlang-mode-local-vars-hook #'lsp! 'append))
|
(add-hook 'erlang-mode-local-vars-hook #'lsp! 'append))
|
||||||
|
|
||||||
|
@ -4,3 +4,7 @@
|
|||||||
(assert! (or (not (modulep! +lsp))
|
(assert! (or (not (modulep! +lsp))
|
||||||
(modulep! :tools lsp))
|
(modulep! :tools lsp))
|
||||||
"This module requires (:tools lsp)")
|
"This module requires (:tools lsp)")
|
||||||
|
|
||||||
|
(when (modulep! :editor format)
|
||||||
|
(unless (executable-find "efmt")
|
||||||
|
(warn! "Couldn't find efmt. Formatting will be disabled.")))
|
||||||
|
Reference in New Issue
Block a user