about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-03-23 23:10:43 -0500
committerCase Duckworth2021-03-23 23:10:43 -0500
commite679a9bd98fd37a5cc148ec90beaa76e0867e929 (patch)
tree6983e8a13432bc483e499f529e170cc15abaea66
parentWhitespace? (diff)
downloademacs-e679a9bd98fd37a5cc148ec90beaa76e0867e929.tar.gz
emacs-e679a9bd98fd37a5cc148ec90beaa76e0867e929.zip
Stuff
-rw-r--r--init.el30
1 files 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 @@
42;; I don't want `visual-line-mode', because I really only want to wrap and 42;; I don't want `visual-line-mode', because I really only want to wrap and
43;; truncate lines. Believe me, I know what I'm doing. 43;; truncate lines. Believe me, I know what I'm doing.
44(acdw/set '((word-wrap t) 44(acdw/set '((word-wrap t)
45 (truncate-lines t))) 45 (truncate-lines nil)))
46 46
47;; Whitespace 47;; Whitespace
48(acdw/set '((whitespace-style 48(acdw/set '((whitespace-style
@@ -409,26 +409,25 @@
409 409
410;; General 410;; General
411 411
412(acdw/pkg reformatter
413 :now ((require 'reformatter)))
414
415(acdw/set `((smie-indent-basic ,tab-width))) 412(acdw/set `((smie-indent-basic ,tab-width)))
416 413
414;; Formatting
415
416(acdw/pkg (apheleia
417 :host github
418 :repo "raxod502/apheleia")
419 :now ((apheleia-global-mode +1))
420 :then ((add-to-list 'apheleia-formatters
421 '(shfmt . ("shfmt")))
422 (add-to-list 'apheleia-mode-alist
423 '(sh-mode . shfmt))))
424
417;; Shell(s) 425;; Shell(s)
418(when (executable-find "shellcheck") 426(when (executable-find "shellcheck")
419 (acdw/pkg flymake-shellcheck 427 (acdw/pkg flymake-shellcheck
420 :hooks ((sh-mode-hook (flymake-mode 428 :hooks ((sh-mode-hook (flymake-mode
421 flymake-shellcheck-load))))) 429 flymake-shellcheck-load)))))
422 430
423(when (executable-find "shfmt")
424 (reformatter-define shfmt
425 :program "shfmt"
426 :lighter " Shfmt")
427 (defun hook--shfmt-on-save-saving-excursion ()
428 (save-excursion
429 (shfmt-buffer)))
430 (acdw/hooks ((sh-mode-hook hook--shfmt-on-save-saving-excursion))))
431
432(acdw/set `((sh-basic-offset ,tab-width) 431(acdw/set `((sh-basic-offset ,tab-width)
433 (sh-indent-after-case 0) 432 (sh-indent-after-case 0)
434 (sh-indent-for-case-alt +) 433 (sh-indent-for-case-alt +)
@@ -456,6 +455,11 @@
456;; Racket 455;; Racket
457(acdw/pkg racket-mode) 456(acdw/pkg racket-mode)
458 457
458;; Web stuff
459(acdw/set '((css-indent-offset 2)
460 (js-indent-level 2)
461 (sgml-indent-offset 2)))
462
459;;; Miscellaneous 463;;; Miscellaneous
460 464
461(acdw/set '((disabled-command-function nil) 465(acdw/set '((disabled-command-function nil)