summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2024-04-26 11:23:04 +0200
committerAlan Pearce2024-04-26 11:23:45 +0200
commit1e6b51d56c85e9311467baa1ccd6ba7a6ef98293 (patch)
tree0a7159569006aca473d5d22052f73389fa6e0446 /user/emacs
parent08bddc4fc7219246aa17d0e03e27d4517462c8ad (diff)
downloadnixfiles-1e6b51d56c85e9311467baa1ccd6ba7a6ef98293.tar.lz
nixfiles-1e6b51d56c85e9311467baa1ccd6ba7a6ef98293.tar.zst
nixfiles-1e6b51d56c85e9311467baa1ccd6ba7a6ef98293.zip
emacs: fix eldoc messages being cleared by aphelia when enabled
Diffstat (limited to 'user/emacs')
-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"))