From 0165cc6bfc9905b5806ba879e7a7cdf0233d4351 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 29 Sep 2021 17:21:50 -0500 Subject: Change apheleia stupid indenting --- init.el | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index c3cbb68..e294a95 100644 --- a/init.el +++ b/init.el @@ -964,30 +964,26 @@ specific to most general, they are these: (setup (:straight (apheleia :host github :repo "raxod502/apheleia")) - - (apheleia-global-mode +1) - - ;; Use a dumb formatter on modes that `apheleia' doesn't work for. - (add-hook 'before-save-hook - (defun before-save@dumb-auto-format () - (setq stupid-modes '(makefile-mode - org-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)))))) + + (:also-load acdw-apheleia) + (add-hook 'before-save-hook #'apheleia-dumb-auto-format) + + ;; Aphelia can't find prettier on Windows (though I + ;; installed it, I think), and it keeps trying to start + ;; new processes until Emacs runs out of subprocess space. + ;; So I just enable it at home. + (unless (acdw/system :work) + (apheleia-global-mode +1))) (setup (:straight async) (dired-async-mode +1)) (setup (:straight avy) - (:global "C-'" #'avy-goto-char-timer + (:global "M-j" #'avy-goto-char-timer "C-c C-j" #'avy-resume) (:with-feature isearch - (:bind "C-'" #'avy-isearch))) + (:bind "M-j" #'avy-isearch))) (setup (:straight circe) (require 'circe) -- cgit 1.4.1-21-gabe81