Stuff
This commit is contained in:
parent
6707795b08
commit
e679a9bd98
30
init.el
30
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)
|
||||
|
|
Loading…
Reference in New Issue