mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-01-11 19:51:32 -08:00
fix(erlang): formatter command
Close: #8506 Co-authored-by: apostaat <apostaat@users.noreply.github.com>
This commit is contained in:
parent
04b7490dec
commit
96498a9859
2 changed files with 4 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode)
|
||||
:config
|
||||
(set-formatter! 'erlfmt '("rebar3" "fmt" "-")
|
||||
(set-formatter! 'erlfmt '("rebar3" "format")
|
||||
:modes '(erlang-mode erlang-ts-mode))
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'erlang-mode-local-vars-hook #'lsp! 'append)))
|
||||
|
|
|
|||
|
|
@ -10,5 +10,7 @@
|
|||
"This module requires (:tools tree-sitter)")
|
||||
|
||||
(when (modulep! :editor format)
|
||||
(unless (and (executable-find "rebar3") (zerop (car (doom-call-process "rebar3" "fmt" "-v"))))
|
||||
(if (executable-find "rebar3")
|
||||
(unless (zerop (car (doom-call-process "rebar3" "format")))
|
||||
(warn! "Couldn't find rebar3 with format plugin installed. Formatting will be disabled."))
|
||||
(warn! "Couldn't find erlfmt. Formatting will be disabled.")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue