summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-03-29 23:21:58 -0500
committerCase Duckworth2021-03-29 23:21:58 -0500
commitdb3d8d26a2b533955b1645eb1e482e1bb38a28ba (patch)
tree79b56b55257808665ac2c31f2a06190d630d9c72
parentRemove commented code (diff)
downloademacs-db3d8d26a2b533955b1645eb1e482e1bb38a28ba.tar.gz
emacs-db3d8d26a2b533955b1645eb1e482e1bb38a28ba.zip
Sturf
-rw-r--r--init.el322
1 files changed, 168 insertions, 154 deletions
diff --git a/init.el b/init.el index cec8777..05bca5f 100644 --- a/init.el +++ b/init.el
@@ -18,7 +18,7 @@
18 18
19;;; `setup' -- configuration macro 19;;; `setup' -- configuration macro
20(straight-use-package '(setup :host nil 20(straight-use-package '(setup :host nil
21 :repo "https://git.sr.ht/~zge/setup")) 21 :repo "https://git.sr.ht/~zge/setup"))
22(require 'setup) 22(require 'setup)
23 23
24;; shorthand for `customize-set-variable' (via setup) 24;; shorthand for `customize-set-variable' (via setup)
@@ -43,7 +43,7 @@
43(setup-define :acdw/map 43(setup-define :acdw/map
44 (lambda (key command) 44 (lambda (key command)
45 `(define-key acdw/map 45 `(define-key acdw/map
46 ,(if (stringp key) (kbd key) key) 46 ,(if (stringp key) (kbd key) key)
47 #',command)) 47 #',command))
48 :documentation "Bind KEY to COMMAND in `acdw/map'." 48 :documentation "Bind KEY to COMMAND in `acdw/map'."
49 :debug '(form sexp) 49 :debug '(form sexp)
@@ -53,7 +53,7 @@
53(setup-define :acdw/leader 53(setup-define :acdw/leader
54 (lambda (key command) 54 (lambda (key command)
55 `(define-key acdw/leader 55 `(define-key acdw/leader
56 ,(if (stringp key) (kbd key) key) 56 ,(if (stringp key) (kbd key) key)
57 #',command)) 57 #',command))
58 :documentation "Bind KEY to COMMAND in `acdw/leader' map." 58 :documentation "Bind KEY to COMMAND in `acdw/leader' map."
59 :debug '(form sexp) 59 :debug '(form sexp)
@@ -65,7 +65,7 @@
65 `(progn 65 `(progn
66 (autoload #',command (symbol-name setup-name)) 66 (autoload #',command (symbol-name setup-name))
67 (define-key (symbol-value setup-map) 67 (define-key (symbol-value setup-map)
68 ,(if (stringp key) (kbd key) key) 68 ,(if (stringp key) (kbd key) key)
69 #',command))) 69 #',command)))
70 :documentation "Bind KEY to COMMAND, and autload COMMAND from FEATURE." 70 :documentation "Bind KEY to COMMAND, and autload COMMAND from FEATURE."
71 :debug '(form sexp) 71 :debug '(form sexp)
@@ -133,10 +133,10 @@
133 133
134;; Uniquify 134;; Uniquify
135(setup (:require uniquify) 135(setup (:require uniquify)
136 (:option uniquify-buffer-name-style 'forward 136 (:option uniquify-buffer-name-style 'forward
137 uniquify-separator path-separator 137 uniquify-separator path-separator
138 uniquify-after-kill-buffer-p t 138 uniquify-after-kill-buffer-p t
139 uniquify-ignore-buffers-re "^\\*")) 139 uniquify-ignore-buffers-re "^\\*"))
140 140
141;; Files 141;; Files
142(setc backup-directory-alist `((".*" . ,(acdw/in-dir "backup/" t))) 142(setc backup-directory-alist `((".*" . ,(acdw/in-dir "backup/" t)))
@@ -155,26 +155,24 @@
155 (acdw/when-unfocused #'save-some-buffers t))) 155 (acdw/when-unfocused #'save-some-buffers t)))
156 156
157(setup (:require autorevert) 157(setup (:require autorevert)
158 (global-auto-revert-mode +1)) 158 (global-auto-revert-mode +1))
159 159
160(setup (:require saveplace) 160(setup (:require saveplace)
161 (:option save-place-file (acdw/in-dir "places.el") 161 (:option save-place-file (acdw/in-dir "places.el")
162 save-place-forget-unreadable-files (eq acdw/system :home)) 162 save-place-forget-unreadable-files (eq acdw/system :home))
163 (save-place-mode +1)) 163 (save-place-mode +1))
164 164
165(setup (:require recentf) 165(setup (:require recentf)
166 (:option recentf-save-file (acdw/in-dir "recentf.el") 166 (:option recentf-save-file (acdw/in-dir "recentf.el")
167 recentf-max-menu-items 100 167 recentf-max-menu-items 100
168 recentf-max-saved-items nil 168 recentf-max-saved-items nil
169 recentf-auto-cleanup 60 169 recentf-auto-cleanup 60
170 (append recentf-exclude) acdw/dir) 170 (append recentf-exclude) acdw/dir)
171 (recentf-mode +1)) 171 (recentf-mode +1))
172 172
173;; Minibuffer 173;; Minibuffer
174(setc minibuffer-prompt-properties 174(setc minibuffer-prompt-properties
175 '(read-only t 175 '(read-only t cursor-intangible t face minibuffer-prompt)
176 cursor-intangible t
177 face minibuffer-prompt)
178 enable-recursive-minibuffers t 176 enable-recursive-minibuffers t
179 file-name-shadow-properties '(invisible t intangible t) 177 file-name-shadow-properties '(invisible t intangible t)
180 read-answer-short t) 178 read-answer-short t)
@@ -183,30 +181,30 @@
183(fset 'yes-or-no-p #'y-or-n-p) 181(fset 'yes-or-no-p #'y-or-n-p)
184 182
185(setup (:require savehist) 183(setup (:require savehist)
186 (:option (append savehist-additional-variables) 'kill-ring 184 (:option (append savehist-additional-variables) 'kill-ring
187 (append savehist-additional-variables) 'search-ring 185 (append savehist-additional-variables) 'search-ring
188 (append savehist-additional-variables) 'regexp-search-ring 186 (append savehist-additional-variables) 'regexp-search-ring
189 history-length t 187 history-length t
190 history-delete-duplicates t 188 history-delete-duplicates t
191 savehist-autosave-interval 6 189 savehist-autosave-interval 6
192 savehist-file (acdw/in-dir "savehist.el")) 190 savehist-file (acdw/in-dir "savehist.el"))
193 (savehist-mode +1)) 191 (savehist-mode +1))
194 192
195(setup (:require icomplete) 193(setup (:require icomplete)
196 (:option completion-ignore-case t 194 (:option completion-ignore-case t
197 read-buffer-completion-ignore-case t 195 read-buffer-completion-ignore-case t
198 icomplete-delay-completions-threshold 0 196 icomplete-delay-completions-threshold 0
199 icomplete-max-delay-chars 0 197 icomplete-max-delay-chars 0
200 icomplete-compute-delay 0 198 icomplete-compute-delay 0
201 icomplete-show-matches-on-no-input t 199 icomplete-show-matches-on-no-input t
202 icomplete-with-buffer-completion-tables t 200 icomplete-with-buffer-completion-tables t
203 icomplete-in-buffer t 201 icomplete-in-buffer t
204 completion-styles '(partial-completion substring flex)) 202 completion-styles '(partial-completion substring flex))
205 (fido-mode -1) 203 (fido-mode -1)
206 (icomplete-mode +1)) 204 (icomplete-mode +1))
207 205
208(setup imenu 206(setup imenu
209 (:option imenu-auto-rescan t)) 207 (:option imenu-auto-rescan t))
210 208
211;; Cursor 209;; Cursor
212(setc cursor-type 'bar 210(setc cursor-type 'bar
@@ -230,26 +228,49 @@
230 228
231;; Dired 229;; Dired
232(setup dired 230(setup dired
233 (:option dired-recursive-copies 'always 231 (:option dired-recursive-copies 'always
234 dired-recursive-deletes 'always 232 dired-recursive-deletes 'always
235 delete-by-moving-to-trash t 233 delete-by-moving-to-trash t
236 dired-listing-switches "-Al" 234 dired-listing-switches "-Al"
237 ls-lisp-dirs-first t 235 ls-lisp-dirs-first t
238 dired-ls-F-marks-symlinks t 236 dired-ls-F-marks-symlinks t
239 dired-no-confirm '(byte-compile 237 dired-no-confirm '(byte-compile
240 chgrp chmod chown copy 238 chgrp chmod chown copy
241 hardlink load move 239 hardlink load move
242 shell touch symlink) 240 shell touch symlink)
243 dired-dwim-target t) 241 dired-dwim-target t)
244 (:also-load dired-x) 242 (:also-load dired-x)
245 (:hook dired-hide-details-mode 243 (:hook dired-hide-details-mode
246 hl-line-mode) 244 hl-line-mode)
247 (:acdw/map "C-x C-j" dired-jump)) 245 (:acdw/map "C-x C-j" dired-jump))
248 246
247
248;;;; Web browsing
249(when (eq acdw/system :work)
250 (add-to-list 'exec-path "C:/Program Files/Mozilla Firefox"))
251
252(setup browse-url
253 (:option browse-url-browser-function 'eww-browse-url
254 browse-url-secondary-browser-function (if (executable-find "firefox")
255 'browse-url-firefox
256 'browse-url-default-browser)
257 browse-url-new-window-flag t
258 browse-url-firefox-new-window-is-tab t))
259
260(setup shr
261 (:option shr-width text-width
262 shr-max-width text-width
263 shr-max-image-proportion 0.6
264 shr-image-animate t
265 shr-discard-aria-hidden t))
266
267(add-hook 'text-mode-hook #'goto-address-mode)
268(add-hook 'prog-mode-hook #'goto-address-prog-mode)
269
249;; Eshell 270;; Eshell
250(setup eshell 271(setup eshell
251 (:option eshell-directory-name (acdw/in-dir "eshell/" t) 272 (:option eshell-directory-name (acdw/in-dir "eshell/" t)
252 eshell-aliases-file (acdw/in-dir "eshell/aliases" t))) 273 eshell-aliases-file (acdw/in-dir "eshell/aliases" t)))
253 274
254;; Garbage collection 275;; Garbage collection
255(add-hook 'minibuffer-setup-hook #'acdw/gc-disable) 276(add-hook 'minibuffer-setup-hook #'acdw/gc-disable)
@@ -269,7 +290,13 @@
269 disabled-command-function nil 290 disabled-command-function nil
270 load-prefer-newer t 291 load-prefer-newer t
271 comp-async-report-warnings-errors nil 292 comp-async-report-warnings-errors nil
272 frame-title-format "%b %+%* GNU Emacs") 293 frame-title-format "%b %+%* GNU Emacs"
294 use-dialog-box nil
295 use-file-dialog nil
296 inhibit-startup-echo-area-message (pcase acdw/system
297 (:home "acdw")
298 (:work "aduckworth")
299 (:other (getenv "USER"))))
273 300
274;; Etc. bindings 301;; Etc. bindings
275(autoload 'ehelp-command "ehelp" nil nil 'keymap) 302(autoload 'ehelp-command "ehelp" nil nil 'keymap)
@@ -286,95 +313,99 @@
286 313
287;;; Interactivity 314;;; Interactivity
288 315
289
290;;;; Begin-end 316;;;; Begin-end
291(setup (:straight beginend) 317(setup (:straight beginend)
292 (beginend-global-mode +1)) 318 (beginend-global-mode +1))
293 319
294;;;; Expand-region 320;;;; Expand-region
295(setup (:straight expand-region) 321(setup (:straight expand-region)
296 (:acdw/map "C-=" er/expand-region)) 322 (:acdw/map "C-=" er/expand-region))
297 323
298;;;; CRUX 324;;;; CRUX
299(setup (:straight crux) 325(setup (:straight crux)
300 (:with-map acdw/map 326 (:with-map acdw/map
301 (:bind "M-o" crux-other-window-or-switch-buffer) 327 (:bind "M-o" crux-other-window-or-switch-buffer)
302 (:bind "C-a" crux-move-beginning-of-line) 328 (:bind "C-a" crux-move-beginning-of-line)
303 (:bind "C-k" crux-kill-and-join-forward)) 329 (:bind "C-k" crux-kill-and-join-forward))
304 (crux-reopen-as-root-mode +1)) 330 (crux-reopen-as-root-mode +1))
305 331
306;;; Functionality 332;;; Functionality
307 333
334;;;; Async
335(setup (:straight async)
336 (autoload 'dired-async-mode "dired-async.el" nil t)
337 (dired-async-mode +1))
338
308;;;; Undo-fu 339;;;; Undo-fu
309(setup (:straight undo-fu) 340(setup (:straight undo-fu)
310 (:with-map acdw/map 341 (:with-map acdw/map
311 (:bind "C-/" undo-fu-only-undo 342 (:bind "C-/" undo-fu-only-undo
312 "C-?" undo-fu-only-redo))) 343 "C-?" undo-fu-only-redo)))
313 344
314(setup (:straight undo-fu-session) 345(setup (:straight undo-fu-session)
315 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" 346 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
316 "/git-rebase-todo\\'") 347 "/git-rebase-todo\\'")
317 undo-fu-session-directory (acdw/in-dir "undo/" t)) 348 undo-fu-session-directory (acdw/in-dir "undo/" t))
318 (global-undo-fu-session-mode +1)) 349 (global-undo-fu-session-mode +1))
319 350
320;;; Minibuffer 351;;; Minibuffer
321 352
322;;;; Icomplete-vertical 353;;;; Icomplete-vertical
323(setup (:straight icomplete-vertical) 354(setup (:straight icomplete-vertical)
324 (let ((map icomplete-minibuffer-map)) 355 (let ((map icomplete-minibuffer-map))
325 (let ((command #'icomplete-forward-completions)) 356 (let ((command #'icomplete-forward-completions))
326 (define-key map (kbd "<down>") command) 357 (define-key map (kbd "<down>") command)
327 (define-key map (kbd "C-n") command)) 358 (define-key map (kbd "C-n") command))
328 (let ((command #'icomplete-backward-completions)) 359 (let ((command #'icomplete-backward-completions))
329 (define-key map (kbd "<up>") command) 360 (define-key map (kbd "<up>") command)
330 (define-key map (kbd "C-p") command)) 361 (define-key map (kbd "C-p") command))
331 (define-key map (kbd "RET") #'icomplete-force-complete-and-exit) 362 (define-key map (kbd "RET") #'icomplete-force-complete-and-exit)
332 (define-key map (kbd "C-RET") #'minibuffer-complete-and-exit)) 363 (define-key map (kbd "C-RET") #'minibuffer-complete-and-exit))
333 (icomplete-vertical-mode +1)) 364 (icomplete-vertical-mode +1))
334 365
335;;;; Orderless 366;;;; Orderless
336(setup (:straight orderless) 367(setup (:straight orderless)
337 (:option (prepend completion-styles) 'orderless)) 368 (:option (prepend completion-styles) 'orderless))
338 369
339;;;; Consult 370;;;; Consult
340(setup (:straight consult) 371(setup (:straight consult)
341 (:with-map acdw/map 372 (:with-map acdw/map
342 (:bind-autoload 373 (:bind-autoload
343 ;; C-c bindings (`mode-specific-map') 374 ;; C-c bindings (`mode-specific-map')
344 "C-c h" consult-history 375 "C-c h" consult-history
345 "C-c m" consult-mode-command 376 "C-c m" consult-mode-command
346 ;; C-x bindings (`ctl-x-map') 377 ;; C-x bindings (`ctl-x-map')
347 "C-x M-:" consult-complex-command 378 "C-x M-:" consult-complex-command
348 "C-x b" consult-buffer 379 "C-x b" consult-buffer
349 "C-x 4 b" consult-buffer-other-window 380 "C-x 4 b" consult-buffer-other-window
350 "C-x 5 b" consult-buffer-other-frame 381 "C-x 5 b" consult-buffer-other-frame
351 "C-x r x" consult-register 382 "C-x r x" consult-register
352 "C-x r b" consult-bookmark 383 "C-x r b" consult-bookmark
353 ;; M-g bindings (`goto-map') 384 ;; M-g bindings (`goto-map')
354 "M-g o" consult-outline 385 "M-g o" consult-outline
355 "M-g m" consult-mark 386 "M-g m" consult-mark
356 "M-g k" consult-global-mark 387 "M-g k" consult-global-mark
357 "M-g i" consult-imenu 388 "M-g i" consult-imenu
358 "M-g e" consult-error 389 "M-g e" consult-error
359 ;; M-s bindings (`search-map') 390 ;; M-s bindings (`search-map')
360 "M-s g" consult-grep ; alts: consult-git-grep, consult-ripgrep 391 "M-s g" consult-grep ; alts: consult-git-grep, consult-ripgrep
361 "M-s f" consult-find ; alts: consult-locate 392 "M-s f" consult-find ; alts: consult-locate
362 "M-s l" consult-line 393 "M-s l" consult-line
363 "M-s m" consult-multi-occur 394 "M-s m" consult-multi-occur
364 "M-s k" consult-keep-lines 395 "M-s k" consult-keep-lines
365 "M-s u" consult-focus-lines 396 "M-s u" consult-focus-lines
366 ;; Other bindings 397 ;; Other bindings
367 "M-y" consult-yank-pop 398 "M-y" consult-yank-pop
368 "<f1> a" consult-apropos 399 "<f1> a" consult-apropos
369 "C-h a" consult-apropos)) 400 "C-h a" consult-apropos))
370 (autoload 'consult-register-preview "consult") 401 (autoload 'consult-register-preview "consult")
371 (:option register-preview-delay 0 402 (:option register-preview-delay 0
372 register-preview-function #'consult-register-preview)) 403 register-preview-function #'consult-register-preview))
373 404
374;;;; Marginalia 405;;;; Marginalia
375(setup (:straight marginalia) 406(setup (:straight marginalia)
376 (:option marginalia-annotators '(marginalia-annotators-heavy 407 (:option marginalia-annotators '(marginalia-annotators-heavy
377 marginalia-annotators-light)) 408 marginalia-annotators-light))
378 (marginalia-mode +1)) 409 (marginalia-mode +1))
379 410
380;;; UI 411;;; UI
@@ -383,19 +414,19 @@
383(setup (:straight (modus-themes 414(setup (:straight (modus-themes
384 :host gitlab 415 :host gitlab
385 :repo "protesilaos/modus-themes")) 416 :repo "protesilaos/modus-themes"))
386 (:option modus-themes-slanted-constructs t 417 (:option modus-themes-slanted-constructs t
387 modus-themes-bold-constructs t 418 modus-themes-bold-constructs t
388 modus-themes-region 'bg-only 419 modus-themes-region 'bg-only
389 modus-themes-org-blocks 'grayscale 420 modus-themes-org-blocks 'grayscale
390 modus-themes-headings '((1 . section) 421 modus-themes-headings '((1 . section)
391 (t . no-color)) 422 (t . no-color))
392 modus-themes-mode-line nil) 423 modus-themes-mode-line nil)
393 (acdw/sunrise-sunset #'modus-themes-load-operandi 424 (acdw/sunrise-sunset #'modus-themes-load-operandi
394 #'modus-themes-load-vivendi)) 425 #'modus-themes-load-vivendi))
395 426
396;;;; Mode line 427;;;; Mode line
397(setup (:straight simple-modeline) 428(setup (:straight simple-modeline)
398 (setup (:straight minions)) 429 (setup (:straight minions))
399 (:option simple-modeline-segments 430 (:option simple-modeline-segments
400 '((acdw-modeline/modified 431 '((acdw-modeline/modified
401 acdw-modeline/buffer-name 432 acdw-modeline/buffer-name
@@ -415,13 +446,13 @@
415;;;; 0x0 -- upload files to a nullpointer 446;;;; 0x0 -- upload files to a nullpointer
416(setup (:straight (0x0 :host nil 447(setup (:straight (0x0 :host nil
417 :repo "https://git.sr.ht/~zge/nullpointer-emacs")) 448 :repo "https://git.sr.ht/~zge/nullpointer-emacs"))
418 (:option 0x0-default-host 'ttm)) 449 (:option 0x0-default-host 'ttm))
419 450
420;;; Applications 451;;; Applications
421 452
422;;;; Magit 453;;;; Magit
423(setup (:straight magit) 454(setup (:straight magit)
424 (:acdw/leader "g" magit-status) 455 (:acdw/leader "g" magit-status)
425 (:option magit-display-buffer-function 456 (:option magit-display-buffer-function
426 (defun magit-display-buffer-same-window (buffer) 457 (defun magit-display-buffer-same-window (buffer)
427 "Display BUFFER in the selected window like God intended." 458 "Display BUFFER in the selected window like God intended."
@@ -430,29 +461,19 @@
430 461
431;;;; File browsing 462;;;; File browsing
432(setup (:straight dired-subtree) 463(setup (:straight dired-subtree)
433 (define-key dired-mode-map "i" #'dired-subtree-toggle)) 464 (define-key dired-mode-map "i" #'dired-subtree-toggle))
434 465
435(setup (:straight dired-collapse) 466(setup (:straight dired-collapse)
436 (:hook-into dired-mode)) 467 (:hook-into dired-mode))
437
438;;;; Web browsing
439(when (eq acdw/system :work)
440 (add-to-list 'exec-path "C:/Program Files/Mozilla Firefox"))
441
442(setc browse-url-browser-function 'browse-url-firefox
443 browse-url-new-window-flag t
444 browse-url-firefox-new-window-is-tab t
445 shr-max-width fill-column
446 shr-width fill-column)
447 468
448(add-hook 'text-mode-hook #'goto-address-mode) 469(setup (:straight trashed)
449(add-hook 'prog-mode-hook #'goto-address-prog-mode) 470 (:option trashed-action-confirmer 'y-or-n-p))
450 471
451;;;; Gemini/gopher browsing 472;;;; Gemini/gopher browsing
452(setup (:straight (elpher :host nil 473(setup (:straight (elpher :host nil
453 :repo "git://thelambdalab.xyz/elpher.git")) 474 :repo "git://thelambdalab.xyz/elpher.git"))
454 (:option elpher-ipv4-always t 475 (:option elpher-ipv4-always t
455 elpher-certificate-directory (acdw/in-dir "elpher/")) 476 elpher-certificate-directory (acdw/in-dir "elpher/"))
456 (:bind "n" elpher-next-link 477 (:bind "n" elpher-next-link
457 "p" elpher-prev-link 478 "p" elpher-prev-link
458 "o" elpher-follow-current-link 479 "o" elpher-follow-current-link
@@ -464,18 +485,18 @@
464(setup (:straight (gemini-mode 485(setup (:straight (gemini-mode
465 :host nil 486 :host nil
466 :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) 487 :repo "https://git.carcosa.net/jmcbray/gemini.el.git"))
467 (:option (append auto-mode-alist) 488 (:option (append auto-mode-alist)
468 '("\\.\\(gemini\\|gmi\\)\\'" . gemini-mode))) 489 '("\\.\\(gemini\\|gmi\\)\\'" . gemini-mode)))
469 490
470;;;; Read e-books (nov.el) 491;;;; Read e-books (nov.el)
471(setup (:straight nov) 492(setup (:straight nov)
472 (:option nov-text-width fill-column 493 (:option nov-text-width fill-column
473 (append auto-mode-alist) '("\\.epub\\'" . nov-mode))) 494 (append auto-mode-alist) '("\\.epub\\'" . nov-mode)))
474 495
475;;;; Org mode 496;;;; Org mode
476(setup (:straight (org :host nil 497(setup (:straight (org :host nil
477 :repo "https://code.orgmode.org/bzg/org-mode.git")) 498 :repo "https://code.orgmode.org/bzg/org-mode.git"))
478 (require 'acdw-org) 499 (require 'acdw-org)
479 (:option org-directory "~/org" 500 (:option org-directory "~/org"
480 org-hide-emphasis-markers t 501 org-hide-emphasis-markers t
481 org-fontify-whole-heading-line t 502 org-fontify-whole-heading-line t
@@ -503,33 +524,26 @@
503;;;; Formatting 524;;;; Formatting
504(setup (:straight (apheleia :host github 525(setup (:straight (apheleia :host github
505 :repo "raxod502/apheleia")) 526 :repo "raxod502/apheleia"))
506 (apheleia-global-mode +1)) 527 (apheleia-global-mode +1))
507 528
508;;;; Emacs lisp 529;;;; Emacs lisp
509(setup emacs-lisp 530(setup emacs-lisp
510 (require 'cl-lib)
511 (:option eval-expression-print-length nil 531 (:option eval-expression-print-length nil
512 eval-expression-print-level nil 532 eval-expression-print-level nil
513 lisp-indent-function #'common-lisp-indent-function) 533 lisp-indent-function #'lisp-indent-function))
514 (put 'cl-flet 'common-lisp-indent-function
515 (get 'flet 'common-lisp-indent-function))
516 (put 'cl-labels 'common-lisp-indent-function
517 (get 'labels 'common-lisp-indent-function))
518 (put 'if 'common-lisp-indent-function 2)
519 (put 'dotimes-protect 'common-lisp-indent-function
520 (get 'when 'common-lisp-indent-function)))
521 534
522;;;; Shell scripts 535;;;; Shell scripts
523(setup sh 536(setup sh
524 (:option sh-basic-offset tab-width 537 (:option sh-basic-offset tab-width
525 sh-indent-after-case 0 538 sh-indent-after-case 0
526 sh-indent-for-case-alt '+ 539 sh-indent-for-case-alt '+
527 sh-indent-for-case-label 0) 540 sh-indent-for-case-label 0)
528 (:local-set indent-tabs-mode t) 541 (:local-set indent-tabs-mode t)
529 542
530 (when (executable-find "shfmt") 543 (when (executable-find "shfmt")
531 (:option (append apheleia-formatters) '(shfmt . ("shfmt")) 544 (with-eval-after-load 'apheleia
532 (append apheleia-mode-alist) '(sh-mode . shfmt))) 545 (:option (append apheleia-formatters) '(shfmt . ("shfmt"))
546 (append apheleia-mode-alist) '(sh-mode . shfmt))))
533 547
534 (when (executable-find "shellcheck") 548 (when (executable-find "shellcheck")
535 (straight-use-package 'flymake-shellcheck) 549 (straight-use-package 'flymake-shellcheck)
@@ -538,9 +552,9 @@
538 552
539;;;; Web languages 553;;;; Web languages
540(setup (:straight web-mode) 554(setup (:straight web-mode)
541 (:option css-level-offset 2 555 (:option css-level-offset 2
542 js-indent-level 2 556 js-indent-level 2
543 sgml-indent-offset 2) 557 sgml-indent-offset 2)
544 (dolist (extension '("\\(p\\|dj\\)?html" 558 (dolist (extension '("\\(p\\|dj\\)?html"
545 "html?" 559 "html?"
546 "\\(tpl\\.\\)?php" 560 "\\(tpl\\.\\)?php"