about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2022-05-27 13:26:19 -0500
committerCase Duckworth2022-05-27 13:26:19 -0500
commit80abceb212b2acb420317232cb2c3d0ab69af13b (patch)
treecac3f2260b593d3c2227743e4895bbc392f5be7f /init.el
parentDon't inhibit redisplay or message when debugging (diff)
downloademacs-80abceb212b2acb420317232cb2c3d0ab69af13b.tar.gz
emacs-80abceb212b2acb420317232cb2c3d0ab69af13b.zip
asdpofiuasdpfoiasjdpfoiajsdf
Diffstat (limited to 'init.el')
-rw-r--r--init.el130
1 files changed, 41 insertions, 89 deletions
diff --git a/init.el b/init.el index 9bd342b..2932768 100644 --- a/init.el +++ b/init.el
@@ -38,7 +38,8 @@
38 ;; good functioning. In this block, I add extra things or more "experimental" 38 ;; good functioning. In this block, I add extra things or more "experimental"
39 ;; ones that might not belong in a separate file. 39 ;; ones that might not belong in a separate file.
40 (:also-load +lisp) 40 (:also-load +lisp)
41 (:option truncate-string-ellipsis "…") 41 (:option truncate-string-ellipsis "…"
42 ring-bell-function 'ignore)
42 ;; Bindings 43 ;; Bindings
43 (:global "C-x C-k" #'kill-current-buffer 44 (:global "C-x C-k" #'kill-current-buffer
44 "C-x 4 n" #'clone-buffer 45 "C-x 4 n" #'clone-buffer
@@ -52,7 +53,7 @@
52 "C-x C-m" #'execute-extended-command ; original: coding systems 53 "C-x C-m" #'execute-extended-command ; original: coding systems
53 "C-<backspace>" #'+backward-kill-word 54 "C-<backspace>" #'+backward-kill-word
54 "C-x TAB" #'+indent-rigidly 55 "C-x TAB" #'+indent-rigidly
55 "C-x C-c" nil) 56 "C-x C-c" #'+save-buffers-quit)
56 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults 57 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
57 (global-set-key (kbd "C-h") 'delete-backward-char) 58 (global-set-key (kbd "C-h") 'delete-backward-char)
58 (keyboard-translate ?\C-h ?\C-?) 59 (keyboard-translate ?\C-h ?\C-?)
@@ -105,8 +106,8 @@
105 (dolist (var '(safe-local-variable-values 106 (dolist (var '(safe-local-variable-values
106 warning-suppress-types)) 107 warning-suppress-types))
107 (add-to-list '+custom-variable-allowlist var)) 108 (add-to-list '+custom-variable-allowlist var))
108 (+ensure-after-init 109 (+with-ensure-after-init
109 (+custom-load-ignoring-most-customizations)) 110 (+custom-load-ignoring-most-customizations))
110 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) 111 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets)
111 (:with-mode Custom-mode 112 (:with-mode Custom-mode
112 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression))) 113 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression)))
@@ -147,7 +148,7 @@
147 (+ensure-after-init #'+key-global-mode)) 148 (+ensure-after-init #'+key-global-mode))
148 149
149(setup _work 150(setup _work
150 (+with-ensure-after-init 151 (with-eval-after-load 'bbdb
151 (require '_work))) 152 (require '_work)))
152 153
153(setup abbrev 154(setup abbrev
@@ -672,12 +673,13 @@
672 (:global [f8] #'org-clock-in 673 (:global [f8] #'org-clock-in
673 [f9] #'org-clock-out 674 [f9] #'org-clock-out
674 "C-c l" #'org-store-link) 675 "C-c l" #'org-store-link)
675 (:hook #'variable-pitch-mode 676 (+with-ensure-after-init
677 (:hook #'variable-pitch-mode
676 #'visual-fill-column-mode 678 #'visual-fill-column-mode
677 #'turn-off-auto-fill 679 #'turn-off-auto-fill
678 #'org-indent-mode 680 #'org-indent-mode
679 #'prettify-symbols-mode 681 #'prettify-symbols-mode
680 #'+org-wrap-on-hyphens) 682 #'+org-wrap-on-hyphens))
681 (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→) 683 (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→)
682 ("SCHEDULED:" . ?↷) 684 ("SCHEDULED:" . ?↷)
683 ("CLOSED:" . ?✓)) 685 ("CLOSED:" . ?✓))
@@ -974,12 +976,10 @@
974 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _) 976 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
975 (setq input (orderless-pattern-compiler input)) 977 (setq input (orderless-pattern-compiler input))
976 (cons input (lambda (str) (orderless--highlight input str))))) 978 (cons input (lambda (str) (orderless--highlight input str)))))
977 (+with-eval-after-loads (affe vertico-multiform) 979 (+with-eval-after-loads (affe)
978 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _) 980 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
979 (setq input (orderless-pattern-compiler input)) 981 (setq input (orderless-pattern-compiler input))
980 (cons input (lambda (str) (orderless--highlight input str))))) 982 (cons input (lambda (str) (orderless--highlight input str)))))
981 (setf (alist-get 'affe-grep vertico-multiform-commands) nil
982 (alist-get 'affe-find vertico-multiform-commands) nil)
983 (:+key "M-s g" #'affe-grep 983 (:+key "M-s g" #'affe-grep
984 "M-s f" #'affe-find))) 984 "M-s f" #'affe-find)))
985 985
@@ -1262,10 +1262,7 @@
1262 column-number-mode nil 1262 column-number-mode nil
1263 file-percentage-mode nil 1263 file-percentage-mode nil
1264 visual-fill-column-extra-text-width 1264 visual-fill-column-extra-text-width
1265 (cons +circe-left-margin 0)) 1265 (cons +circe-left-margin 0)))
1266 (with-eval-after-load 'vertico-multiform
1267 (setf (alist-get 'lui-next-button-or-complete vertico-multiform-commands)
1268 '(flat))))
1269 1266
1270 (tracking-mode +1) 1267 (tracking-mode +1)
1271 (:with-mode tracking-mode 1268 (:with-mode tracking-mode
@@ -1383,41 +1380,10 @@
1383 (comint-mode-map . comint-mode-hook) 1380 (comint-mode-map . comint-mode-hook)
1384 (sly-mrepl-mode-map . sly-mrepl-hook))) 1381 (sly-mrepl-mode-map . sly-mrepl-hook)))
1385 (with-eval-after-load 'orderless 1382 (with-eval-after-load 'orderless
1386 (:option consult--regexp-compiler #'consult--orderless-regexp-compiler)) 1383 (:option consult--regexp-compiler #'consult--orderless-regexp-compiler))))
1387 (with-eval-after-load 'vertico-multiform
1388 (setf (alist-get 'consult-buffer vertico-multiform-commands) '(flat))
1389 (dolist (buf-cmd '(consult-find
1390 consult-flymake
1391 consult-focus-lines
1392 consult-git-grep
1393 consult-grep
1394 consult-imenu
1395 consult-imenu-multi
1396 consult-keep-lines
1397 consult-line
1398 consult-line-multi
1399 consult-locate
1400 consult-multi-occur
1401 consult-outline
1402 consult-ripgrep
1403 consult-yank-pop))
1404 (setf (alist-get buf-cmd vertico-multiform-commands) nil)))))
1405
1406(setup (:straight consult-dir)
1407 (:load-after consult)
1408 (:+key "C-x C-d" #'consult-dir)
1409 (:with-map vertico-map
1410 (:bind "C-x C-d" #'consult-dir
1411 "C-x C-j" #'consult-dir-jump-file)))
1412
1413(setup (:straight consult-notmuch)
1414 (:load-after consult notmuch)
1415 (with-eval-after-load 'vertico-multiform
1416 (setf (alist-get 'consult-notmuch vertico-multiform-commands) nil
1417 (alist-get 'consult-notmuch-tree vertico-multiform-commands) nil)))
1418 1384
1419(setup (:straight corfu) 1385(setup (:straight corfu)
1420 (corfu-global-mode +1)) 1386 (global-corfu-mode +1))
1421 1387
1422(setup (:straight crossword) 1388(setup (:straight crossword)
1423 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I 1389 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I
@@ -1587,11 +1553,7 @@
1587 (:bind "C-." #'embark-act 1553 (:bind "C-." #'embark-act
1588 "M-." #'embark-dwim)) 1554 "M-." #'embark-dwim))
1589 (:with-map embark-file-map 1555 (:with-map embark-file-map
1590 (:bind "l" #'vlf)) 1556 (:bind "l" #'vlf)))
1591 ;; Integrations
1592 (with-eval-after-load 'vertico-multiform
1593 (setf (alist-get 'embark-prefix-help-command vertico-multiform-commands)
1594 nil)))
1595 1557
1596(setup (:straight embark-consult) 1558(setup (:straight embark-consult)
1597 (:load-after consult embark) 1559 (:load-after consult embark)
@@ -1687,9 +1649,7 @@
1687 (:option flyspell-correct--cr-key ";") 1649 (:option flyspell-correct--cr-key ";")
1688 (:bind-into flyspell 1650 (:bind-into flyspell
1689 "C-;" #'flyspell-correct-wrapper 1651 "C-;" #'flyspell-correct-wrapper
1690 "<f7>" #'+flyspell-correct-buffer) 1652 "<f7>" #'+flyspell-correct-buffer))
1691 (with-eval-after-load 'vertico-multiform
1692 (setf (alist-get 'flyspell vertico-multiform-categories) nil)))
1693 1653
1694(setup (:straight focus) 1654(setup (:straight focus)
1695 (:require) 1655 (:require)
@@ -1765,12 +1725,6 @@
1765 "<f1> v" #'helpful-variable 1725 "<f1> v" #'helpful-variable
1766 "<f1> k" #'helpful-key 1726 "<f1> k" #'helpful-key
1767 "<f1> ." #'helpful-at-point) 1727 "<f1> ." #'helpful-at-point)
1768 (with-eval-after-load 'vertico-multiform
1769 (dolist (cmd '(describe-symbol ; describe-* included here for completeness
1770 describe-function describe-variable
1771 helpful-function helpful-macro helpful-callable
1772 helpful-variable))
1773 (setf (alist-get cmd vertico-multiform-commands) nil)))
1774 ;; Load faster on first invocation by pre-loading a slow function 1728 ;; Load faster on first invocation by pre-loading a slow function
1775 ;; (see https://github.com/Wilfred/helpful/issues/236) 1729 ;; (see https://github.com/Wilfred/helpful/issues/236)
1776 (run-with-idle-timer 1 nil (lambda () 1730 (run-with-idle-timer 1 nil (lambda ()
@@ -1778,8 +1732,8 @@
1778 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode)))) 1732 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode))))
1779 1733
1780(setup (:straight (hippie-completing-read 1734(setup (:straight (hippie-completing-read
1781 :host github 1735 :host nil
1782 :repo "duckwork/hippie-completing-read")) 1736 :repo "https://codeberg.org/acdw/hippie-completing-read.el"))
1783 (:+key "M-/" #'hippie-completing-read)) 1737 (:+key "M-/" #'hippie-completing-read))
1784 1738
1785(setup (:straight hungry-delete) 1739(setup (:straight hungry-delete)
@@ -1918,10 +1872,7 @@
1918 (keychain-refresh-environment)) 1872 (keychain-refresh-environment))
1919 1873
1920(setup (:straight lacarte) 1874(setup (:straight lacarte)
1921 (:+key "<f10>" #'lacarte-execute-menu-command) 1875 (:+key "<f10>" #'lacarte-execute-menu-command))
1922 (with-eval-after-load 'vertico-multiform
1923 (setf (alist-get 'lacarte-execute-menu-command vertico-multiform-commands)
1924 '(buffer grid (vertico-sort-function . vertico-sort-length-alpha)))))
1925 1876
1926(setup (:straight (lin :host nil 1877(setup (:straight (lin :host nil
1927 :repo "https://git.sr.ht/~protesilaos/lin")) 1878 :repo "https://git.sr.ht/~protesilaos/lin"))
@@ -1967,7 +1918,11 @@
1967 lisp-interaction-mode-map)) 1918 lisp-interaction-mode-map))
1968 (define-key (symbol-value m) (kbd "C-c e") #'macrostep-expand))) 1919 (define-key (symbol-value m) (kbd "C-c e") #'macrostep-expand)))
1969 1920
1970(setup (:straight (magit :host github :repo "magit/magit"))) 1921(setup (:straight (magit :host github :repo "magit/magit"
1922 :build (:not compile))
1923 (:straight (transient :host github :repo "magit/transient"
1924 :build (:not compile))))
1925 (autoload 'transient--with-suspended-override "transient"))
1971 1926
1972(setup (:straight marginalia) 1927(setup (:straight marginalia)
1973 (marginalia-mode +1)) 1928 (marginalia-mode +1))
@@ -2098,12 +2053,13 @@
2098 ((,class :inherit font-lock-comment-face 2053 ((,class :inherit font-lock-comment-face
2099 :foreground ,fg-header 2054 :foreground ,fg-header
2100 :background ,yellow-intense-bg))) 2055 :background ,yellow-intense-bg)))
2101 `(mode-line 2056 ;; `(mode-line
2102 ((,class :height 100))) 2057 ;; ((,class :height 100)))
2103 `(mode-line-inactive 2058 ;; `(mode-line-inactive
2104 ((,class :height 100))) 2059 ;; ((,class :height 100)))
2105 `(tab-bar 2060 ;; `(tab-bar
2106 ((,class :height 100))))))) 2061 ;; ((,class :height 100)))
2062 ))))
2107 2063
2108 (require 'dawn) 2064 (require 'dawn)
2109 (dawn-schedule #'modus-themes-load-operandi 2065 (dawn-schedule #'modus-themes-load-operandi
@@ -2140,6 +2096,13 @@
2140 (:hook #'visual-fill-column-mode) 2096 (:hook #'visual-fill-column-mode)
2141 (:file-match (rx ".epub" eos))) 2097 (:file-match (rx ".epub" eos)))
2142 2098
2099(setup (:straight nyan-mode)
2100 (:require)
2101 ;; For some reason, in some modes the mode-line isn't updated after these
2102 ;; commands. I think it might have to do with `+modeline-position-function'.
2103 (advice-add 'end-of-buffer :after #'force-mode-line-update)
2104 (advice-add 'beginning-of-buffer :after #'force-mode-line-update))
2105
2143(setup (:straight ol-notmuch)) 2106(setup (:straight ol-notmuch))
2144 2107
2145(setup (:straight orderless) 2108(setup (:straight orderless)
@@ -2342,6 +2305,7 @@
2342 +modeline-major-mode 2305 +modeline-major-mode
2343 (lambda () (+modeline-vc " : ")) 2306 (lambda () (+modeline-vc " : "))
2344 +modeline-anzu 2307 +modeline-anzu
2308 +modeline-nyan-on-focused
2345 ) 2309 )
2346 ( ; right 2310 ( ; right
2347 simple-modeline-segment-process 2311 simple-modeline-segment-process
@@ -2350,7 +2314,6 @@
2350 (+modeline-concat 2314 (+modeline-concat
2351 '(+modeline-track 2315 '(+modeline-track
2352 simple-modeline-segment-misc-info)))) 2316 simple-modeline-segment-misc-info))))
2353 simple-modeline-segment-process
2354 ,(+modeline-concat 2317 ,(+modeline-concat
2355 '(+modeline-god-mode 2318 '(+modeline-god-mode
2356 +modeline-kmacro-indicator 2319 +modeline-kmacro-indicator
@@ -2360,7 +2323,7 @@
2360 +modeline-input-method) 2323 +modeline-input-method)
2361 " ") 2324 " ")
2362 +modeline-position 2325 +modeline-position
2363 ;; +modeline-spacer 2326 +modeline-spacer
2364 ))) 2327 )))
2365 (simple-modeline-mode +1)) 2328 (simple-modeline-mode +1))
2366 2329
@@ -2483,7 +2446,8 @@
2483(setup (:straight (twtxt 2446(setup (:straight (twtxt
2484 :fork (:repo "duckwork/twtxt-el"))) 2447 :fork (:repo "duckwork/twtxt-el")))
2485 (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt" 2448 (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt"
2486 twtxt-following '(("acdw" "https://acdw.casa/tw.txt")))) 2449 twtxt-following '(("acdw" "https://acdw.casa/tw.txt")))
2450 (+with-ensure-after-init (:require)))
2487 2451
2488(setup (:straight undo-fu) 2452(setup (:straight undo-fu)
2489 (:option undo-fu-allow-undo-in-region t) 2453 (:option undo-fu-allow-undo-in-region t)
@@ -2533,20 +2497,8 @@
2533 ;; Extensions 2497 ;; Extensions
2534 (:also-load vertico-directory 2498 (:also-load vertico-directory
2535 vertico-mouse 2499 vertico-mouse
2536 vertico-unobtrusive
2537 vertico-multiform
2538 vertico-quick) 2500 vertico-quick)
2539 (vertico-mouse-mode +1) 2501 (vertico-mouse-mode +1)
2540 (vertico-multiform-mode +1)
2541 ;; I `setf' these so they don't override the other setfs elsewhere in init.el.
2542 (setf (alist-get 'execute-extended-command vertico-multiform-commands) '(flat))
2543 (setf (alist-get 'completion-at-point vertico-multiform-commands) '(flat))
2544 (setf (alist-get 'indent-for-tab-command vertico-multiform-commands) '(flat))
2545 (setf (alist-get 'insert-char vertico-multiform-commands) nil)
2546 (setf (alist-get 'file vertico-multiform-categories) nil)
2547 (setf (alist-get 'bookmark vertico-multiform-categories) nil)
2548 ;; Default. Needs to be `add-to-list' so that it appears at the end.
2549 (add-to-list 'vertico-multiform-categories '(t flat) :append)
2550 (:with-map vertico-map 2502 (:with-map vertico-map
2551 (:bind "RET" #'vertico-directory-enter 2503 (:bind "RET" #'vertico-directory-enter
2552 "DEL" #'vertico-directory-delete-char 2504 "DEL" #'vertico-directory-delete-char