From e679a9bd98fd37a5cc148ec90beaa76e0867e929 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 23 Mar 2021 23:10:43 -0500 Subject: Stuff --- init.el | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/init.el b/init.el index 046fdc3..2422c97 100644 --- a/init.el +++ b/init.el @@ -42,7 +42,7 @@ ;; I don't want `visual-line-mode', because I really only want to wrap and ;; truncate lines. Believe me, I know what I'm doing. (acdw/set '((word-wrap t) - (truncate-lines t))) + (truncate-lines nil))) ;; Whitespace (acdw/set '((whitespace-style @@ -409,26 +409,25 @@ ;; General -(acdw/pkg reformatter - :now ((require 'reformatter))) - (acdw/set `((smie-indent-basic ,tab-width))) +;; Formatting + +(acdw/pkg (apheleia + :host github + :repo "raxod502/apheleia") + :now ((apheleia-global-mode +1)) + :then ((add-to-list 'apheleia-formatters + '(shfmt . ("shfmt"))) + (add-to-list 'apheleia-mode-alist + '(sh-mode . shfmt)))) + ;; Shell(s) (when (executable-find "shellcheck") (acdw/pkg flymake-shellcheck :hooks ((sh-mode-hook (flymake-mode flymake-shellcheck-load))))) -(when (executable-find "shfmt") - (reformatter-define shfmt - :program "shfmt" - :lighter " Shfmt") - (defun hook--shfmt-on-save-saving-excursion () - (save-excursion - (shfmt-buffer))) - (acdw/hooks ((sh-mode-hook hook--shfmt-on-save-saving-excursion)))) - (acdw/set `((sh-basic-offset ,tab-width) (sh-indent-after-case 0) (sh-indent-for-case-alt +) @@ -456,6 +455,11 @@ ;; Racket (acdw/pkg racket-mode) +;; Web stuff +(acdw/set '((css-indent-offset 2) + (js-indent-level 2) + (sgml-indent-offset 2))) + ;;; Miscellaneous (acdw/set '((disabled-command-function nil) -- cgit 1.4.1-21-gabe81