summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--user/emacs/init.el14
1 files changed, 5 insertions, 9 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 22a9094e..bcb73ed8 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1104,24 +1104,20 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
 
 (use-package format-all
   :defer 10
-  :ghook ('(clojure-mode-hook
-            dockerfile-ts-mode-hook
-            emacs-lisp-mode-hook
-            json-ts-mode-hook
-            markdown-mode-hook
-            sql-mode-hook
-            toml-mode-hook))
+  :ghook ('prog-mode-hook)
   :gfhook #'format-all-ensure-formatter
   :init (progn
           (advice-add 'format-all-ensure-formatter
                       :around #'quiet)
           (defun turn-off-format-all-mode ()
-            (format-all-mode -1)))
+            (when format-all-mode
+              (format-all-mode -1))))
   :config (progn
-            (setq format-all-show-errors 'never)))
+            (setq format-all-show-errors 'errors)))
 
 (use-package apheleia
   :defer 10
+  :ghook 'prog-mode-hook
   :config (progn
             (setf (alist-get 'shfmt apheleia-formatters)
                   '("shfmt"))