diff --git a/modules/emacs/default.el b/modules/emacs/default.el index 2a3f21c..5ae84d0 100644 --- a/modules/emacs/default.el +++ b/modules/emacs/default.el @@ -577,6 +577,31 @@ "/=" ":::" ">=>" "->>" "<=>" "<=<" "<->")) (global-ligature-mode t)) +;; apheleia +(use-package apheleia + :defer t + :diminish apheleia-mode + :custom + (apheleia-formatters + `((alejandra "alejandra") + (black "black" "-") + (brittany "brittany") + (clang-format "clang-format") + (fish-indent . ("fish_indent")) + (gofmt . ("gofmt")) + (google-java-format . ("google-java-format" "-")) + (isort . ("isort" "-")) + (latexindent . ("latexindent" "--logfile=/dev/null")) + (mix-format . ("mix" "format" "-")) + (nixfmt . ("nixfmt")) + (prettier . (,die-orga/executables/prettier "--stdin-filepath" filepath)) + (rustfmt . ("rustfmt" "--quiet" "--emit" "stdout")) + (terraform . ("terraform" "fmt" "-")))) + :preface + (diminish 'apheleia-mode) + :init + (apheleia-global-mode t)) + (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix index 3412ffa..c1ef1ea 100644 --- a/modules/emacs/default.nix +++ b/modules/emacs/default.nix @@ -42,6 +42,7 @@ with lib; let alert all-the-icons all-the-icons-dired + apheleia beacon bln-mode cargo-mode