From f2dd261315e92bf7869febdf2d6652ddca0ad212 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 14 Apr 2021 18:40:05 -0500 Subject: Remove some modes from dumb-format --- init.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index a46c475..e7bdd37 100644 --- a/init.el +++ b/init.el @@ -719,8 +719,11 @@ if ripgrep is installed, otherwise `consult-grep'." ;; Use a dumb formatter on modes that `apheleia' doesn't work for. (hook-defun dumb-auto-format before-save-hook - (unless (and (fboundp 'apheleia--get-formatter-command) - (apheleia--get-formatter-command)) + (setq stupid-modes '(makefile-mode)) + ;; If there's no apheleia formatter for the mode, just indent the buffer. + (unless (or (apply #'derived-mode-p stupid-modes) + (and (fboundp 'apheleia--get-formatter-command) + (apheleia--get-formatter-command))) (indent-region (point-min) (point-max))))) (setup (:straight company) @@ -785,8 +788,8 @@ if ripgrep is installed, otherwise `consult-grep'." (setup (:straight geiser)) -(when-let (lisp-bin (or (executable-find "clisp") - (executable-find "sbcl"))) +(when-let (lisp-bin (or (executable-find "sbcl") + (executable-find "clisp"))) (setup (:straight slime) (require 'slime-autoloads) (:option inferior-lisp-program lisp-bin) -- cgit 1.4.1-21-gabe81