diff options
author | Case Duckworth | 2022-06-08 17:59:53 -0500 |
---|---|---|
committer | Case Duckworth | 2022-06-08 17:59:53 -0500 |
commit | af3eb37c8e51084261f2ad4bfe1d36fffbcfaebf (patch) | |
tree | 5555dc7a42ce8d226a9cbd1e68ba4f760b42f22b /init.el | |
parent | Add link to new server (diff) | |
download | emacs-af3eb37c8e51084261f2ad4bfe1d36fffbcfaebf.tar.gz emacs-af3eb37c8e51084261f2ad4bfe1d36fffbcfaebf.zip |
blep
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 212 |
1 files changed, 112 insertions, 100 deletions
diff --git a/init.el b/init.el index 2932768..f7fbe96 100644 --- a/init.el +++ b/init.el | |||
@@ -45,7 +45,6 @@ | |||
45 | "C-x 4 n" #'clone-buffer | 45 | "C-x 4 n" #'clone-buffer |
46 | "C-c v" #'visible-mode | 46 | "C-c v" #'visible-mode |
47 | "C-M-;" #'+lisp-comment-or-uncomment-sexp | 47 | "C-M-;" #'+lisp-comment-or-uncomment-sexp |
48 | "M-j" nil | ||
49 | "C-x C-o" #'+switch-to-last-buffer | 48 | "C-x C-o" #'+switch-to-last-buffer |
50 | "C-x o" #'+switch-to-last-buffer | 49 | "C-x o" #'+switch-to-last-buffer |
51 | "C-x C-l" #'+open-paragraph ; original: downcase-region | 50 | "C-x C-l" #'+open-paragraph ; original: downcase-region |
@@ -53,7 +52,13 @@ | |||
53 | "C-x C-m" #'execute-extended-command ; original: coding systems | 52 | "C-x C-m" #'execute-extended-command ; original: coding systems |
54 | "C-<backspace>" #'+backward-kill-word | 53 | "C-<backspace>" #'+backward-kill-word |
55 | "C-x TAB" #'+indent-rigidly | 54 | "C-x TAB" #'+indent-rigidly |
55 | "<f7>" #'flyspell-mode | ||
56 | "C-x C-c" #'+save-buffers-quit) | 56 | "C-x C-c" #'+save-buffers-quit) |
57 | ;; Disable bindings | ||
58 | (:global "M-j" nil | ||
59 | "<Scroll_Lock>" nil) | ||
60 | (:+leader "C-t d" #'toggle-debug-on-error | ||
61 | "C-t q" #'toggle-debug-on-quit) | ||
57 | ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults | 62 | ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults |
58 | (global-set-key (kbd "C-h") 'delete-backward-char) | 63 | (global-set-key (kbd "C-h") 'delete-backward-char) |
59 | (keyboard-translate ?\C-h ?\C-?) | 64 | (keyboard-translate ?\C-h ?\C-?) |
@@ -81,6 +86,8 @@ | |||
81 | (+with-ensure-after-init | 86 | (+with-ensure-after-init |
82 | (:hook #'+init-add-setup-to-imenu))) | 87 | (:hook #'+init-add-setup-to-imenu))) |
83 | 88 | ||
89 | (setup (:require +window)) | ||
90 | |||
84 | (setup (:require auth-source) | 91 | (setup (:require auth-source) |
85 | (:option auth-sources (list 'default | 92 | (:option auth-sources (list 'default |
86 | "secrets:passwords" | 93 | "secrets:passwords" |
@@ -106,6 +113,9 @@ | |||
106 | (dolist (var '(safe-local-variable-values | 113 | (dolist (var '(safe-local-variable-values |
107 | warning-suppress-types)) | 114 | warning-suppress-types)) |
108 | (add-to-list '+custom-variable-allowlist var)) | 115 | (add-to-list '+custom-variable-allowlist var)) |
116 | ;; Load customizations now, and after init (to capture other possible | ||
117 | ;; variables I want to load) XXX: this is dumb | ||
118 | (+custom-load-ignoring-most-customizations) | ||
109 | (+with-ensure-after-init | 119 | (+with-ensure-after-init |
110 | (+custom-load-ignoring-most-customizations)) | 120 | (+custom-load-ignoring-most-customizations)) |
111 | (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) | 121 | (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) |
@@ -165,15 +175,19 @@ | |||
165 | auto-revert-verbose nil) | 175 | auto-revert-verbose nil) |
166 | (global-auto-revert-mode +1)) | 176 | (global-auto-revert-mode +1)) |
167 | 177 | ||
178 | (setup awk-mode | ||
179 | (:apheleia gawk '("gawk" "-f-" "-o-"))) | ||
180 | |||
168 | (setup bookmark | 181 | (setup bookmark |
169 | (:option bookmark-save-flag 1 | 182 | (:option bookmark-save-flag 1 |
170 | bookmark-watch-bookmark-file 'silent)) | 183 | bookmark-watch-bookmark-file 'silent |
184 | bookmark-set-fringe-mark nil)) | ||
171 | 185 | ||
172 | (setup browse-url | 186 | (setup browse-url |
173 | (:require +browse-url) | 187 | (:require +browse-url) |
174 | (:option | 188 | (:option |
175 | browse-url-browser-function #'eww-browse-url | 189 | browse-url-browser-function 'browse-url-default-browser |
176 | +browse-url-browser-function browse-url-browser-function | 190 | +browse-url-browser-function #'eww-browse-url |
177 | browse-url-generic-program (seq-some #'executable-find | 191 | browse-url-generic-program (seq-some #'executable-find |
178 | '("firefox" | 192 | '("firefox" |
179 | "chromium" | 193 | "chromium" |
@@ -214,6 +228,7 @@ | |||
214 | ;; Set up URL handlers. | 228 | ;; Set up URL handlers. |
215 | (:option browse-url-handlers | 229 | (:option browse-url-handlers |
216 | (list | 230 | (list |
231 | (cons (rx bos (or "gemini:" "gopher:")) #'elpher-browse-url-elpher) | ||
217 | (cons (rx ; images | 232 | (cons (rx ; images |
218 | "." (or "jpeg" "jpg" "png" "bmp") eos) | 233 | "." (or "jpeg" "jpg" "png" "bmp") eos) |
219 | (lambda (&rest args) | 234 | (lambda (&rest args) |
@@ -328,7 +343,8 @@ | |||
328 | (setup eshell | 343 | (setup eshell |
329 | (:also-load em-smart | 344 | (:also-load em-smart |
330 | em-tramp) | 345 | em-tramp) |
331 | (:require +eshell) | 346 | (:require +eshell |
347 | esh-module) | ||
332 | (+define-dir eshell/ (locate-user-emacs-file "eshell") | 348 | (+define-dir eshell/ (locate-user-emacs-file "eshell") |
333 | "Where to place Eshell-specific files.") | 349 | "Where to place Eshell-specific files.") |
334 | (:option eshell-aliases-file (eshell/ "aliases") | 350 | (:option eshell-aliases-file (eshell/ "aliases") |
@@ -353,9 +369,11 @@ | |||
353 | (* " "))) | 369 | (* " "))) |
354 | (:+leader "s" #'+eshell-here | 370 | (:+leader "s" #'+eshell-here |
355 | "C-s" #'+eshell-here) | 371 | "C-s" #'+eshell-here) |
372 | (add-to-list 'eshell-modules-list 'eshell-tramp) | ||
356 | (with-eval-after-load 'mwim | 373 | (with-eval-after-load 'mwim |
357 | (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) | 374 | (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) |
358 | #'eshell-bol)) | 375 | #'eshell-bol)) |
376 | (:hook #'eshell-smart-initialize) | ||
359 | (+eshell-eval-after-load | 377 | (+eshell-eval-after-load |
360 | ;; Local modes | 378 | ;; Local modes |
361 | (dolist (mode '((hungry-delete-mode . -1))) | 379 | (dolist (mode '((hungry-delete-mode . -1))) |
@@ -381,7 +399,10 @@ | |||
381 | (setup eww | 399 | (setup eww |
382 | (:also-load +eww) | 400 | (:also-load +eww) |
383 | (:option eww-search-prefix "https://duckduckgo.com/html?q=" | 401 | (:option eww-search-prefix "https://duckduckgo.com/html?q=" |
384 | url-privacy-level '(email agent cookies lastloc)) | 402 | url-privacy-level '(email agent cookies lastloc) |
403 | eww-use-browse-url (rx bos (or "mailto:" | ||
404 | "gemini:" | ||
405 | "gopher:"))) | ||
385 | (add-hook 'eww-after-render-hook #'reading-mode) | 406 | (add-hook 'eww-after-render-hook #'reading-mode) |
386 | (:hook #'+eww-bookmark-setup | 407 | (:hook #'+eww-bookmark-setup |
387 | #'+eww-track-readable-mode) | 408 | #'+eww-track-readable-mode) |
@@ -390,9 +411,6 @@ | |||
390 | "M-n" nil | 411 | "M-n" nil |
391 | "M-p" nil)) | 412 | "M-p" nil)) |
392 | 413 | ||
393 | (setup flyspell | ||
394 | (:hook-into org-mode)) | ||
395 | |||
396 | (setup hideshow | 414 | (setup hideshow |
397 | (:also-load +hideshow) | 415 | (:also-load +hideshow) |
398 | (:with-mode hs-minor-mode | 416 | (:with-mode hs-minor-mode |
@@ -422,9 +440,12 @@ | |||
422 | ("help" (or (mode . help-mode) | 440 | ("help" (or (mode . help-mode) |
423 | (mode . Info-mode) | 441 | (mode . Info-mode) |
424 | (mode . helpful-mode))) | 442 | (mode . helpful-mode))) |
425 | ("irc" (or (mode . erc-mode) | 443 | ("chat" (or (mode . erc-mode) |
426 | (mode . circe-server-mode) | 444 | (mode . circe-server-mode) |
427 | (mode . circe-channel-mode))) | 445 | (mode . circe-channel-mode) |
446 | (mode . jabber-chat-mode) | ||
447 | (mode . jabber-browse-mode) | ||
448 | (mode . jabber-roster-mode))) | ||
428 | ("shell" (or (mode . eshell-mode) | 449 | ("shell" (or (mode . eshell-mode) |
429 | (mode . shell-mode) | 450 | (mode . shell-mode) |
430 | (mode . vterm-mode))) | 451 | (mode . vterm-mode))) |
@@ -531,17 +552,25 @@ | |||
531 | (add-hook 'message-send-hook #'+send-mail-dispatch) | 552 | (add-hook 'message-send-hook #'+send-mail-dispatch) |
532 | (advice-add 'notmuch-tag :filter-args #'+notmuch-correct-tags) | 553 | (advice-add 'notmuch-tag :filter-args #'+notmuch-correct-tags) |
533 | (:option notmuch-saved-searches (list | 554 | (:option notmuch-saved-searches (list |
534 | (list :name "inbox" | 555 | (list :name "inbox+unread" |
535 | :query (+notmuch-query-concat | 556 | :query (+notmuch-query-concat |
536 | "tag:inbox" | 557 | "tag:inbox" |
537 | "tag:unread" | 558 | "tag:unread" |
538 | "NOT tag:Spam") | 559 | "NOT tag:Spam") |
539 | :key "i") | 560 | :key "i") |
540 | (list :name "lists" | 561 | (list :name "inbox" |
562 | :query (+notmuch-query-concat | ||
563 | "tag:inbox" | ||
564 | "NOT tag:Spam") | ||
565 | :key "I") | ||
566 | (list :name "lists+unread" | ||
541 | :query (+notmuch-query-concat | 567 | :query (+notmuch-query-concat |
542 | "tag:/List/" | 568 | "tag:/List/" |
543 | "tag:unread") | 569 | "tag:unread") |
544 | :key "l") | 570 | :key "l") |
571 | (list :name "lists" | ||
572 | :query "tag:/List/" | ||
573 | :key "L") | ||
545 | (list :name "unread" | 574 | (list :name "unread" |
546 | :query (+notmuch-query-concat | 575 | :query (+notmuch-query-concat |
547 | "tag:unread" | 576 | "tag:unread" |
@@ -630,7 +659,7 @@ | |||
630 | org-src-window-setup 'current-window | 659 | org-src-window-setup 'current-window |
631 | org-startup-truncated nil | 660 | org-startup-truncated nil |
632 | org-startup-with-inline-images t | 661 | org-startup-with-inline-images t |
633 | org-tags-column (- (- fill-column (length org-ellipsis))) | 662 | org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis))) |
634 | org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" | 663 | org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" |
635 | "|" "DONE(d!)") | 664 | "|" "DONE(d!)") |
636 | (sequence "|" "CANCELED(k@)") | 665 | (sequence "|" "CANCELED(k@)") |
@@ -656,6 +685,7 @@ | |||
656 | ;; )))) | 685 | ;; )))) |
657 | (:bind "RET" #'+org-return-dwim | 686 | (:bind "RET" #'+org-return-dwim |
658 | "<S-return>" #'+org-table-copy-down | 687 | "<S-return>" #'+org-table-copy-down |
688 | "M-RET" #'+org-meta-return | ||
659 | "C-c C-l" #'+org-insert-link-dwim | 689 | "C-c C-l" #'+org-insert-link-dwim |
660 | "C-c C-n" #'+org-next-heading-widen | 690 | "C-c C-n" #'+org-next-heading-widen |
661 | "C-c C-p" #'+org-previous-heading-widen | 691 | "C-c C-p" #'+org-previous-heading-widen |
@@ -675,11 +705,11 @@ | |||
675 | "C-c l" #'org-store-link) | 705 | "C-c l" #'org-store-link) |
676 | (+with-ensure-after-init | 706 | (+with-ensure-after-init |
677 | (:hook #'variable-pitch-mode | 707 | (:hook #'variable-pitch-mode |
678 | #'visual-fill-column-mode | 708 | #'visual-fill-column-mode |
679 | #'turn-off-auto-fill | 709 | #'turn-off-auto-fill |
680 | #'org-indent-mode | 710 | #'org-indent-mode ;; Needed for proper hanging indents in lists |
681 | #'prettify-symbols-mode | 711 | #'prettify-symbols-mode |
682 | #'+org-wrap-on-hyphens)) | 712 | #'+org-wrap-on-hyphens)) |
683 | (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→) | 713 | (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→) |
684 | ("SCHEDULED:" . ?↷) | 714 | ("SCHEDULED:" . ?↷) |
685 | ("CLOSED:" . ?✓)) | 715 | ("CLOSED:" . ?✓)) |
@@ -716,11 +746,13 @@ | |||
716 | ;; complains about "Invalid face reference: t" in org-mode buffers, because | 746 | ;; complains about "Invalid face reference: t" in org-mode buffers, because |
717 | ;; `compose-region' returns t. | 747 | ;; `compose-region' returns t. |
718 | ("^[ \t]*\\([-]\\) " | 748 | ("^[ \t]*\\([-]\\) " |
719 | (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "–") 'fixed-pitch) | 749 | (0 (progn (compose-region (match-beginning 1) (match-end 1) "–") 'fixed-pitch) |
720 | 'fixed-pitch t)) | 750 | ;; 'fixed-pitch t |
751 | )) | ||
721 | ("^[ \t]*\\([+]\\) " | 752 | ("^[ \t]*\\([+]\\) " |
722 | (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "¬") 'fixed-pitch) | 753 | (0 (progn (compose-region (match-beginning 1) (match-end 1) "•") 'fixed-pitch) |
723 | 'fixed-pitch t)) | 754 | ;; 'fixed-pitch t |
755 | )) | ||
724 | ("^[ \t]+\\([*]\\) " | 756 | ("^[ \t]+\\([*]\\) " |
725 | (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "→") 'fixed-pitch) | 757 | (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "→") 'fixed-pitch) |
726 | 'fixed-pitch t)) | 758 | 'fixed-pitch t)) |
@@ -841,10 +873,7 @@ | |||
841 | org-export-with-sub-superscripts t | 873 | org-export-with-sub-superscripts t |
842 | org-export-with-toc nil) | 874 | org-export-with-toc nil) |
843 | (with-eval-after-load 'ox | 875 | (with-eval-after-load 'ox |
844 | (+org-export-pre-hooks-insinuate)) | 876 | (+org-export-pre-hooks-insinuate))) |
845 | (add-hook '+org-export-pre-hook #'+flyspell-correct-buffer) | ||
846 | (with-eval-after-load 'user-save | ||
847 | (add-hook '+org-export-pre-hook #'user-save-run-hooks))) | ||
848 | 877 | ||
849 | (setup password-cache | 878 | (setup password-cache |
850 | (:option password-cache t | 879 | (:option password-cache t |
@@ -869,6 +898,9 @@ | |||
869 | (+scratch-text-scratch)) | 898 | (+scratch-text-scratch)) |
870 | (add-hook 'kill-buffer-query-functions #'+scratch-immortal)) | 899 | (add-hook 'kill-buffer-query-functions #'+scratch-immortal)) |
871 | 900 | ||
901 | (setup sh | ||
902 | (:apheleia shfmt '("shfmt"))) | ||
903 | |||
872 | (setup shell | 904 | (setup shell |
873 | (:option shell-command-prompt-show-cwd t) | 905 | (:option shell-command-prompt-show-cwd t) |
874 | (:local-set +modeline-position-function | 906 | (:local-set +modeline-position-function |
@@ -920,6 +952,9 @@ | |||
920 | (tab-bar-mode +1) | 952 | (tab-bar-mode +1) |
921 | (display-time-mode +1)) | 953 | (display-time-mode +1)) |
922 | 954 | ||
955 | (setup text-mode | ||
956 | (:bind "C-M-k" #'kill-paragraph)) | ||
957 | |||
923 | (setup timer-list | 958 | (setup timer-list |
924 | (:bind "d" #'timer-list-cancel) | 959 | (:bind "d" #'timer-list-cancel) |
925 | (:hook #'hl-line-mode | 960 | (:hook #'hl-line-mode |
@@ -995,6 +1030,10 @@ | |||
995 | [remap isearch-query-replace] #'anzu-isearch-query-replace | 1030 | [remap isearch-query-replace] #'anzu-isearch-query-replace |
996 | [remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp)) | 1031 | [remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp)) |
997 | 1032 | ||
1033 | (setup (:straight apheleia) | ||
1034 | (:require apheleia +apheleia) | ||
1035 | (apheleia-global-mode +1)) | ||
1036 | |||
998 | (setup (:straight avy) | 1037 | (setup (:straight avy) |
999 | (:require avy +avy) | 1038 | (:require avy +avy) |
1000 | (:option avy-background t | 1039 | (:option avy-background t |
@@ -1208,7 +1247,7 @@ | |||
1208 | 1247 | ||
1209 | (:with-mode circe-chat-mode | 1248 | (:with-mode circe-chat-mode |
1210 | (:local-set lui-input-function #'+lui-filter | 1249 | (:local-set lui-input-function #'+lui-filter |
1211 | +modeline-position-function 'empty) | 1250 | +modeline-position-function #'ignore) |
1212 | (:hook #'enable-circe-color-nicks | 1251 | (:hook #'enable-circe-color-nicks |
1213 | #'enable-circe-new-day-notifier | 1252 | #'enable-circe-new-day-notifier |
1214 | #'+circe-chat@set-prompt | 1253 | #'+circe-chat@set-prompt |
@@ -1223,6 +1262,7 @@ | |||
1223 | (:with-mode lui-mode | 1262 | (:with-mode lui-mode |
1224 | (:option lui-fill-column (+ fill-column +circe-left-margin) | 1263 | (:option lui-fill-column (+ fill-column +circe-left-margin) |
1225 | lui-fill-type nil | 1264 | lui-fill-type nil |
1265 | lui-max-buffer-size (+bytes 10 :kb) | ||
1226 | lui-time-stamp-position 'right-margin | 1266 | lui-time-stamp-position 'right-margin |
1227 | lui-time-stamp-format "| %H:%M" | 1267 | lui-time-stamp-format "| %H:%M" |
1228 | lui-track-behavior 'before-switch-to-buffer | 1268 | lui-track-behavior 'before-switch-to-buffer |
@@ -1251,6 +1291,7 @@ | |||
1251 | #'enable-lui-track | 1291 | #'enable-lui-track |
1252 | #'visual-fill-column-mode | 1292 | #'visual-fill-column-mode |
1253 | #'enable-lui-autopaste | 1293 | #'enable-lui-autopaste |
1294 | (defun turn-off-+nyan-mode () (+nyan-local-mode -1)) | ||
1254 | (defun turn-off-electric-pair-mode () (electric-pair-mode -1))) | 1295 | (defun turn-off-electric-pair-mode () (electric-pair-mode -1))) |
1255 | (:local-set fringes-outside-margins t | 1296 | (:local-set fringes-outside-margins t |
1256 | right-margin-width (length lui-time-stamp-format) | 1297 | right-margin-width (length lui-time-stamp-format) |
@@ -1303,8 +1344,10 @@ | |||
1303 | xref-show-xrefs-function #'consult-xref | 1344 | xref-show-xrefs-function #'consult-xref |
1304 | xref-show-definitions-function #'consult-xref | 1345 | xref-show-definitions-function #'consult-xref |
1305 | tab-always-indent 'complete | 1346 | tab-always-indent 'complete |
1306 | ;; completion-in-region-function #'consult-completion-in-region | 1347 | completion-in-region-function #'consult-completion-in-region |
1307 | ) | 1348 | ) |
1349 | (:with-mode minibuffer-mode | ||
1350 | (:local-set completion-in-region-function #'consult-completion-in-region)) | ||
1308 | (advice-add #'register-preview :override #'consult-register-window) | 1351 | (advice-add #'register-preview :override #'consult-register-window) |
1309 | (dolist (binding '(;; C-c bindings (mode-specific-map) | 1352 | (dolist (binding '(;; C-c bindings (mode-specific-map) |
1310 | ("C-c h" . consult-history) | 1353 | ("C-c h" . consult-history) |
@@ -1382,19 +1425,6 @@ | |||
1382 | (with-eval-after-load 'orderless | 1425 | (with-eval-after-load 'orderless |
1383 | (:option consult--regexp-compiler #'consult--orderless-regexp-compiler)))) | 1426 | (:option consult--regexp-compiler #'consult--orderless-regexp-compiler)))) |
1384 | 1427 | ||
1385 | (setup (:straight corfu) | ||
1386 | (global-corfu-mode +1)) | ||
1387 | |||
1388 | (setup (:straight crossword) | ||
1389 | ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I | ||
1390 | ;; know. | ||
1391 | (:hook #'turn-off-+key-mode) | ||
1392 | (:option crossword-save-path (sync/ "emacs/crosswords/" t) | ||
1393 | crossword-empty-position-char "=") | ||
1394 | (:face 'crossword-grid-face '((t :inherit 'font-lock-string-face)) | ||
1395 | 'crossword-current-face '((t :inherit 'highlight)) | ||
1396 | 'crossword-other-dir-face '((t :inherit 'font-lock-keyword-face)))) | ||
1397 | |||
1398 | (setup (:straight crux) | 1428 | (setup (:straight crux) |
1399 | ;; yes it's silly I have an addon to this addon. | 1429 | ;; yes it's silly I have an addon to this addon. |
1400 | (:require crux +crux) | 1430 | (:require crux +crux) |
@@ -1472,6 +1502,11 @@ | |||
1472 | (+with-ensure-after-init | 1502 | (+with-ensure-after-init |
1473 | (edit-server-start))) | 1503 | (edit-server-start))) |
1474 | 1504 | ||
1505 | (setup (:straight editorconfig) | ||
1506 | (:with-mode conf-mode | ||
1507 | (:file-match (rx ".editorconfig" eos))) | ||
1508 | (editorconfig-mode +1)) | ||
1509 | |||
1475 | (setup (:straight electric-cursor) | 1510 | (setup (:straight electric-cursor) |
1476 | (:option electric-cursor-alist '((overwrite-mode . hbar) | 1511 | (:option electric-cursor-alist '((overwrite-mode . hbar) |
1477 | (god-local-mode . box) | 1512 | (god-local-mode . box) |
@@ -1489,7 +1524,7 @@ | |||
1489 | "~/Downloads/") | 1524 | "~/Downloads/") |
1490 | if (file-exists-p dir) | 1525 | if (file-exists-p dir) |
1491 | return dir) | 1526 | return dir) |
1492 | elfeed-search-filter "@1-month-ago +unread" | 1527 | elfeed-search-filter "@10-days-ago +unread" |
1493 | elfeed-search-trailing-width 24 | 1528 | elfeed-search-trailing-width 24 |
1494 | elfeed-search-title-min-width 24 | 1529 | elfeed-search-title-min-width 24 |
1495 | elfeed-search-title-max-width 78 | 1530 | elfeed-search-title-max-width 78 |
@@ -1685,10 +1720,6 @@ | |||
1685 | (:option frowny-eyes (rx (any ":=") (opt "'") (? "-"))) | 1720 | (:option frowny-eyes (rx (any ":=") (opt "'") (? "-"))) |
1686 | (global-frowny-mode +1)) | 1721 | (global-frowny-mode +1)) |
1687 | 1722 | ||
1688 | (setup (:straight gcmh) | ||
1689 | (:option gcmh-idle-delay 'auto) | ||
1690 | (gcmh-mode +1)) | ||
1691 | |||
1692 | (setup (:straight (geiser | 1723 | (setup (:straight (geiser |
1693 | :type git | 1724 | :type git |
1694 | :flavor melpa | 1725 | :flavor melpa |
@@ -1701,8 +1732,8 @@ | |||
1701 | scheme-complete)) | 1732 | scheme-complete)) |
1702 | (straight-use-package pkg)) | 1733 | (straight-use-package pkg)) |
1703 | (:require +chicken) | 1734 | (:require +chicken) |
1704 | (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=) | 1735 | (:with-mode scheme-mode |
1705 | 'scheme-mode) | 1736 | (:file-match (rx ".scm" eos))) |
1706 | (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal) | 1737 | (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal) |
1707 | '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))) | 1738 | '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))) |
1708 | 1739 | ||
@@ -1855,7 +1886,8 @@ | |||
1855 | ((string-match-p "hmm@" (buffer-name)) | 1886 | ((string-match-p "hmm@" (buffer-name)) |
1856 | "🤔 "))) | 1887 | "🤔 "))) |
1857 | file-percentage-mode nil | 1888 | file-percentage-mode nil |
1858 | wrap-prefix (make-string +jabber-ws-prefix ?\ ))) | 1889 | wrap-prefix (make-string +jabber-ws-prefix ?\ ) |
1890 | comment-start nil)) | ||
1859 | (:+leader "C-j" jabber-global-keymap) | 1891 | (:+leader "C-j" jabber-global-keymap) |
1860 | (advice-add 'jabber-activity-add :after #'+jabber-tracking-add) | 1892 | (advice-add 'jabber-activity-add :after #'+jabber-tracking-add) |
1861 | (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc) | 1893 | (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc) |
@@ -1921,7 +1953,7 @@ | |||
1921 | (setup (:straight (magit :host github :repo "magit/magit" | 1953 | (setup (:straight (magit :host github :repo "magit/magit" |
1922 | :build (:not compile)) | 1954 | :build (:not compile)) |
1923 | (:straight (transient :host github :repo "magit/transient" | 1955 | (:straight (transient :host github :repo "magit/transient" |
1924 | :build (:not compile)))) | 1956 | :build (:not compile)))) |
1925 | (autoload 'transient--with-suspended-override "transient")) | 1957 | (autoload 'transient--with-suspended-override "transient")) |
1926 | 1958 | ||
1927 | (setup (:straight marginalia) | 1959 | (setup (:straight marginalia) |
@@ -1929,9 +1961,7 @@ | |||
1929 | 1961 | ||
1930 | (setup (:straight markdown-mode) | 1962 | (setup (:straight markdown-mode) |
1931 | (:option markdown-hide-markup nil) | 1963 | (:option markdown-hide-markup nil) |
1932 | (add-to-list 'auto-mode-alist (cons (rx (or ".md" ".markdown" ".mdown") | 1964 | (:file-match (rx (or ".md" ".markdown" ".mdown") eos)) |
1933 | eos) | ||
1934 | 'markdown-mode)) | ||
1935 | (with-eval-after-load 'visual-fill-column | 1965 | (with-eval-after-load 'visual-fill-column |
1936 | (:hook #'visual-fill-column-mode)) | 1966 | (:hook #'visual-fill-column-mode)) |
1937 | (with-eval-after-load 'apheleia | 1967 | (with-eval-after-load 'apheleia |
@@ -1940,7 +1970,8 @@ | |||
1940 | (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt) | 1970 | (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt) |
1941 | (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt)))) | 1971 | (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt)))) |
1942 | 1972 | ||
1943 | (setup (:straight mastodon) | 1973 | (setup (:straight (mastodon |
1974 | :fork (:host nil :repo "https://codeberg.org/acdw/mastodon.el"))) | ||
1944 | (:option mastodon-instance-url "https://tiny.tilde.website" | 1975 | (:option mastodon-instance-url "https://tiny.tilde.website" |
1945 | mastodon-active-user "acdw" | 1976 | mastodon-active-user "acdw" |
1946 | mastodon-client--token-file (.etc "mastodon.plstore") | 1977 | mastodon-client--token-file (.etc "mastodon.plstore") |
@@ -1957,15 +1988,6 @@ | |||
1957 | #'hl-line-mode | 1988 | #'hl-line-mode |
1958 | #'lin-mode)) | 1989 | #'lin-mode)) |
1959 | 1990 | ||
1960 | (setup (:straight md4rd | ||
1961 | :quit) | ||
1962 | ;; `md4rd' is ... a bit janky, tbh. But I'm including this here so I have it. | ||
1963 | ;; TODO: enable opening Reddit links in md4rd | ||
1964 | (:also-load _md4rd) | ||
1965 | (defalias 'reddit 'md4rd "Browse Reddit.") | ||
1966 | (with-eval-after-load 'md4rd | ||
1967 | (run-with-timer 0 (* 60 59) 'md4rd-refresh-login))) | ||
1968 | |||
1969 | (setup (:straight minions) | 1991 | (setup (:straight minions) |
1970 | (minions-mode +1)) | 1992 | (minions-mode +1)) |
1971 | 1993 | ||
@@ -2096,12 +2118,17 @@ | |||
2096 | (:hook #'visual-fill-column-mode) | 2118 | (:hook #'visual-fill-column-mode) |
2097 | (:file-match (rx ".epub" eos))) | 2119 | (:file-match (rx ".epub" eos))) |
2098 | 2120 | ||
2099 | (setup (:straight nyan-mode) | 2121 | (setup (:straight (nyan-mode |
2100 | (:require) | 2122 | :fork (:repo "duckwork/nyan-mode"))) |
2101 | ;; For some reason, in some modes the mode-line isn't updated after these | 2123 | (:require nyan-mode +nyan-mode) |
2102 | ;; commands. I think it might have to do with `+modeline-position-function'. | 2124 | (with-eval-after-load 'modus-themes |
2103 | (advice-add 'end-of-buffer :after #'force-mode-line-update) | 2125 | (add-hook 'modus-themes-after-load-theme-hook |
2104 | (advice-add 'beginning-of-buffer :after #'force-mode-line-update)) | 2126 | (defun +nyan-modus-update-colors () |
2127 | (modus-themes-with-colors | ||
2128 | (set-face-attribute '+nyan-mode-line nil | ||
2129 | :background bg-special-warm)))) | ||
2130 | (+nyan-modus-update-colors)) | ||
2131 | (+nyan-mode +1)) | ||
2105 | 2132 | ||
2106 | (setup (:straight ol-notmuch)) | 2133 | (setup (:straight ol-notmuch)) |
2107 | 2134 | ||
@@ -2149,19 +2176,6 @@ | |||
2149 | (defun org-mime-setup@org-mode () | 2176 | (defun org-mime-setup@org-mode () |
2150 | (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize)))) | 2177 | (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize)))) |
2151 | 2178 | ||
2152 | (setup (:straight org-modern) | ||
2153 | (:quit "I think I can do most of this myself.") | ||
2154 | (:option org-modern-hide-stars nil | ||
2155 | org-modern-star nil | ||
2156 | org-modern-list nil | ||
2157 | org-modern-progress ["..." "o.." "oo." "Oo." "Ooo" "OOo" "OOO"]) | ||
2158 | (:face 'org-modern-label '((t ( :height 1.0 | ||
2159 | :weight regular | ||
2160 | :underline nil | ||
2161 | :inherit fixed-pitch)))) | ||
2162 | (advice-add 'org-modern--update-label-face :override #'ignore) | ||
2163 | (:hook-into org-mode)) | ||
2164 | |||
2165 | (setup (:straight (org-taskwise | 2179 | (setup (:straight (org-taskwise |
2166 | :host github | 2180 | :host github |
2167 | :repo "duckwork/org-taskwise.el")) | 2181 | :repo "duckwork/org-taskwise.el")) |
@@ -2235,9 +2249,8 @@ | |||
2235 | (executable-find "g++"))) | 2249 | (executable-find "g++"))) |
2236 | (:also-load +pdf-tools) | 2250 | (:also-load +pdf-tools) |
2237 | (:with-mode pdf-view-mode | 2251 | (:with-mode pdf-view-mode |
2238 | (:local-set +modeline-position-function #'+pdf-view-position)) | 2252 | (:local-set +modeline-position-function #'+pdf-view-position) |
2239 | (setf (alist-get "\\.pdf\\'" auto-mode-alist nil nil #'equal) | 2253 | (:file-match (rx ".pdf" eos))) |
2240 | #'pdf-view-mode) | ||
2241 | (pdf-tools-install :no-query)) | 2254 | (pdf-tools-install :no-query)) |
2242 | 2255 | ||
2243 | (setup (:straight persistent-scratch) | 2256 | (setup (:straight persistent-scratch) |
@@ -2304,8 +2317,8 @@ | |||
2304 | +modeline-buffer-name | 2317 | +modeline-buffer-name |
2305 | +modeline-major-mode | 2318 | +modeline-major-mode |
2306 | (lambda () (+modeline-vc " : ")) | 2319 | (lambda () (+modeline-vc " : ")) |
2307 | +modeline-anzu | ||
2308 | +modeline-nyan-on-focused | 2320 | +modeline-nyan-on-focused |
2321 | +modeline-anzu | ||
2309 | ) | 2322 | ) |
2310 | ( ; right | 2323 | ( ; right |
2311 | simple-modeline-segment-process | 2324 | simple-modeline-segment-process |
@@ -2369,7 +2382,9 @@ | |||
2369 | #'describe-gnu-project | 2382 | #'describe-gnu-project |
2370 | #'suspend-frame) | 2383 | #'suspend-frame) |
2371 | (sophomore-disable-with 'confirm | 2384 | (sophomore-disable-with 'confirm |
2372 | #'save-buffers-kill-terminal) | 2385 | #'save-buffers-kill-terminal) |
2386 | (sophomore-disable-with 'confirm-y | ||
2387 | #'+save-buffers-quit) | ||
2373 | (sophomore-mode +1)) | 2388 | (sophomore-mode +1)) |
2374 | 2389 | ||
2375 | (setup (:straight (spongebob-case | 2390 | (setup (:straight (spongebob-case |
@@ -2445,9 +2460,10 @@ | |||
2445 | 2460 | ||
2446 | (setup (:straight (twtxt | 2461 | (setup (:straight (twtxt |
2447 | :fork (:repo "duckwork/twtxt-el"))) | 2462 | :fork (:repo "duckwork/twtxt-el"))) |
2448 | (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt" | 2463 | (:require) |
2449 | twtxt-following '(("acdw" "https://acdw.casa/tw.txt"))) | 2464 | (:also-load _twtxt) |
2450 | (+with-ensure-after-init (:require))) | 2465 | (:option twtxt-file _twtxt-file |
2466 | twtxt-following _twtxt-following)) | ||
2451 | 2467 | ||
2452 | (setup (:straight undo-fu) | 2468 | (setup (:straight undo-fu) |
2453 | (:option undo-fu-allow-undo-in-region t) | 2469 | (:option undo-fu-allow-undo-in-region t) |
@@ -2473,8 +2489,6 @@ | |||
2473 | 'undo-hl-insert '((t :underline t))) | 2489 | 'undo-hl-insert '((t :underline t))) |
2474 | (:hook-into text-mode prog-mode)) | 2490 | (:hook-into text-mode prog-mode)) |
2475 | 2491 | ||
2476 | (setup (:straight unfill)) | ||
2477 | |||
2478 | (setup (:straight valign | 2492 | (setup (:straight valign |
2479 | :quit "Doesn't work with narrowed tables.") | 2493 | :quit "Doesn't work with narrowed tables.") |
2480 | (:option valign-fancy-bar t) | 2494 | (:option valign-fancy-bar t) |
@@ -2535,12 +2549,10 @@ | |||
2535 | :repo "casouri/vundo"))) | 2549 | :repo "casouri/vundo"))) |
2536 | 2550 | ||
2537 | (setup (:straight web-mode) | 2551 | (setup (:straight web-mode) |
2538 | (setf (alist-get (rx "." (or "htm" "html" "phtml" "tpl.php" | 2552 | (:file-match (rx "." (or "htm" "html" "phtml" "tpl.php" |
2539 | "asp" "gsp" "jsp" "ascx" "aspx" | 2553 | "asp" "gsp" "jsp" "ascx" "aspx" |
2540 | "erb" "mustache" "djhtml") | 2554 | "erb" "mustache" "djhtml") |
2541 | eos) | 2555 | eos)) |
2542 | auto-mode-alist) | ||
2543 | 'web-mode) | ||
2544 | (with-eval-after-load 'apheleia | 2556 | (with-eval-after-load 'apheleia |
2545 | (setf (alist-get 'web-mode apheleia-mode-alist) | 2557 | (setf (alist-get 'web-mode apheleia-mode-alist) |
2546 | 'prettier))) | 2558 | 'prettier))) |