all repos — nixfiles @ 1e6b51d56c85e9311467baa1ccd6ba7a6ef98293

System and user configuration, managed by nix and home-manager

emacs: fix eldoc messages being cleared by aphelia when enabled
Alan Pearce alan@alanpearce.eu
Fri, 26 Apr 2024 11:23:04 +0200
commit

1e6b51d56c85e9311467baa1ccd6ba7a6ef98293

parent

08bddc4fc7219246aa17d0e03e27d4517462c8ad

1 files changed, 5 insertions(+), 9 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -1104,24 +1104,20 @@ ;;;; Reformat on save 
 (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"))