summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2022-08-19 13:39:13 -0500
committerCase Duckworth2022-08-19 13:39:13 -0500
commit7d0ff465220bec224c1f0c1163e6b4a88e1fb4c6 (patch)
tree6c36a8846bc74db584713948a6c382d66047e2ad /init.el
parentAdd credit (diff)
downloademacs-7d0ff465220bec224c1f0c1163e6b4a88e1fb4c6.tar.gz
emacs-7d0ff465220bec224c1f0c1163e6b4a88e1fb4c6.zip
bleh
Diffstat (limited to 'init.el')
-rw-r--r--init.el144
1 files changed, 98 insertions, 46 deletions
diff --git a/init.el b/init.el index 6775e33..d3fc88e 100644 --- a/init.el +++ b/init.el
@@ -149,7 +149,7 @@
149(setup (:require user-save) 149(setup (:require user-save)
150 (add-hook 'user-save-before-save-hook #'+clean-empty-lines) 150 (add-hook 'user-save-before-save-hook #'+clean-empty-lines)
151 (add-hook 'user-save-before-save-hook (defun user-save@save-some-buffers () 151 (add-hook 'user-save-before-save-hook (defun user-save@save-some-buffers ()
152 (save-some-buffers t t))) 152 (save-some-buffers t t)))
153 (user-save-global-mode +1)) 153 (user-save-global-mode +1))
154 154
155(setup (:require winner) 155(setup (:require winner)
@@ -520,18 +520,18 @@
520 ) 520 )
521 (with-eval-after-load 'transient 521 (with-eval-after-load 'transient
522 (transient-define-prefix net-utils () 522 (transient-define-prefix net-utils ()
523 "Networking utilities" 523 "Networking utilities"
524 ["Actions" 524 ["Actions"
525 ("p" "Ping" ping) 525 ("p" "Ping" ping)
526 ("i" "Ifconfig" ifconfig) 526 ("i" "Ifconfig" ifconfig)
527 ("w" "Iwconfig" iwconfig) 527 ("w" "Iwconfig" iwconfig)
528 ("n" "Netstat" netstat) 528 ("n" "Netstat" netstat)
529 ("a" "Arp" arp) 529 ("a" "Arp" arp)
530 ("r" "Route" route) 530 ("r" "Route" route)
531 ("h" "Nslookup host" nslookup-host) 531 ("h" "Nslookup host" nslookup-host)
532 ("d" "Dig" dig) 532 ("d" "Dig" dig)
533 ("s" "Smb Client" smbclient) 533 ("s" "Smb Client" smbclient)
534 ("t" "Traceroute" traceroute)]) 534 ("t" "Traceroute" traceroute)])
535 (:+key "C-z M-n" #'net-utils))) 535 (:+key "C-z M-n" #'net-utils)))
536 536
537(setup notmuch 537(setup notmuch
@@ -544,13 +544,20 @@
544 notmuch-address-save-filename (notmuch/ "addresses" t) 544 notmuch-address-save-filename (notmuch/ "addresses" t)
545 notmuch-address-use-company (featurep 'company) 545 notmuch-address-use-company (featurep 'company)
546 notmuch-search-oldest-first nil 546 notmuch-search-oldest-first nil
547 notmuch-archive-tags '("-inbox" "-unread")) 547 notmuch-archive-tags '("-inbox" "-unread")
548 notmuch-draft-tags '("+draft" "-inbox" "-unread"))
548 ;; Reading mail 549 ;; Reading mail
549 (:option notmuch-show-indent-content nil) 550 (:option notmuch-show-indent-content nil)
550 (add-hook 'notmuch-show-mode-hook #'visual-fill-column-mode) 551 (add-hook 'notmuch-show-mode-hook #'visual-fill-column-mode)
552 (:with-mode notmuch-search-mode
553 (:bind "RET" #'notmuch-search-show-thread
554 "M-RET" #'notmuch-tree-from-search-thread
555 "!" #'+notmuch-search-mark-spam))
556 (:with-mode notmuch-tree-mode
557 (:bind "!" #'+notmuch-tree-mark-spam-then-next))
551 ;; Composing mail 558 ;; Composing mail
552 (:option message-kill-buffer-on-exit t 559 (:option message-kill-buffer-on-exit t
553 message-auto-save-directory "~/var/mail/drafts") 560 message-auto-save-directory nil)
554 ;; Sending mail 561 ;; Sending mail
555 (:option send-mail-function #'sendmail-send-it 562 (:option send-mail-function #'sendmail-send-it
556 mail-specify-envelope-from t 563 mail-specify-envelope-from t
@@ -568,38 +575,47 @@
568 "tag:inbox" 575 "tag:inbox"
569 "tag:unread" 576 "tag:unread"
570 "NOT tag:Spam") 577 "NOT tag:Spam")
571 :key "i") 578 :key "m"
579 :search-type 'tree)
572 (list :name "inbox" 580 (list :name "inbox"
573 :query (+notmuch-query-concat 581 :query (+notmuch-query-concat
574 "tag:inbox" 582 "tag:inbox"
575 "NOT tag:Spam") 583 "NOT tag:Spam")
576 :key "I") 584 :key "i"
585 :search-type 'tree)
577 (list :name "lists+unread" 586 (list :name "lists+unread"
578 :query (+notmuch-query-concat 587 :query (+notmuch-query-concat
579 "tag:/List/" 588 "tag:/List/"
580 "tag:unread") 589 "tag:unread")
581 :key "l") 590 :key "l"
591 :search-type 'tree)
582 (list :name "lists" 592 (list :name "lists"
583 :query "tag:/List/" 593 :query "tag:/List/"
584 :key "L") 594 :key "L"
595 :search-type 'tree)
585 (list :name "unread" 596 (list :name "unread"
586 :query (+notmuch-query-concat 597 :query (+notmuch-query-concat
587 "tag:unread" 598 "tag:unread"
588 "NOT tag:Spam") 599 "NOT tag:Spam")
589 :key "u") 600 :key "u"
601 :search-type 'tree)
590 (list :name "flagged" 602 (list :name "flagged"
591 :query "tag:flagged" 603 :query "tag:flagged"
592 :key "f") 604 :key "f"
605 :search-type 'tree)
593 (list :name "sent" 606 (list :name "sent"
594 :query "tag:sent" 607 :query "tag:sent"
595 :key "t") 608 :key "t"
609 :search-type 'tree)
596 (list :name "drafts" 610 (list :name "drafts"
597 :query "tag:draft" 611 :query "tag:draft"
598 :key "d") 612 :key "d"
613 :search-type 'tree)
599 (list :name "all mail" 614 (list :name "all mail"
600 :query "*" 615 :query "*"
601 :key "a")))) 616 :key "a"
602 (:+leader "m" #'+notmuch-goto "C-m" #'+notmuch-goto 617 :search-type 'tree))))
618 (:+leader "m" #'notmuch-mua-new-mail "C-m" #'notmuch-jump-search
603 "n" #'notmuch "C-n" #'notmuch) 619 "n" #'notmuch "C-n" #'notmuch)
604 ;; For `focus' 620 ;; For `focus'
605 (put 'notmuch-message 'bounds-of-thing-at-point 'notmuch-show-message-extent)) 621 (put 'notmuch-message 'bounds-of-thing-at-point 'notmuch-show-message-extent))
@@ -671,10 +687,11 @@
671 org-startup-truncated nil 687 org-startup-truncated nil
672 org-startup-with-inline-images t 688 org-startup-with-inline-images t
673 org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis))) 689 org-tags-column -77 ;; (- (- fill-column 1 (length org-ellipsis)))
674 org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" 690 org-todo-keywords
675 "|" "DONE(d!)" "ASSIGNED(a!)") 691 '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)"
676 (sequence "|" "CANCELED(k@)") 692 "|" "DONE(d!)" "ASSIGNED(a@/!)")
677 (sequence "MEETING(m)")) 693 (sequence "|" "CANCELED(k@)")
694 (sequence "MEETING(m)"))
678 org-use-speed-commands t 695 org-use-speed-commands t
679 org-emphasis-alist '(("*" org-bold) 696 org-emphasis-alist '(("*" org-bold)
680 ("/" org-italic) 697 ("/" org-italic)
@@ -921,8 +938,8 @@
921 (:option shell-command-prompt-show-cwd t) 938 (:option shell-command-prompt-show-cwd t)
922 (:local-set +modeline-position-function 939 (:local-set +modeline-position-function
923 (lambda () (string-replace (getenv "HOME") 940 (lambda () (string-replace (getenv "HOME")
924 "~" 941 "~"
925 default-directory))) 942 default-directory)))
926 (:hook #'form-feed-mode)) 943 (:hook #'form-feed-mode))
927 944
928(setup shr 945(setup shr
@@ -1062,7 +1079,8 @@
1062 (:bind-into isearch 1079 (:bind-into isearch
1063 "M-j" #'avy-isearch) 1080 "M-j" #'avy-isearch)
1064 (setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark) 1081 (setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark)
1065 (+avy-buffer-face-mode +1)) 1082 ;; (+avy-buffer-face-mode +1)
1083 )
1066 1084
1067(setup (:straight bbdb) 1085(setup (:straight bbdb)
1068 (:straight bbdb-vcard) 1086 (:straight bbdb-vcard)
@@ -1070,7 +1088,9 @@
1070 (defun +bbdb-load () 1088 (defun +bbdb-load ()
1071 (:require bbdb-autoloads 1089 (:require bbdb-autoloads
1072 bbdb) 1090 bbdb)
1073 (bbdb-initialize 'gnus 'message)))) 1091 (bbdb-initialize 'gnus 'message)
1092 (bbdb-insinuate-message)
1093 (setq bbdb-complete-mail-allow-cycling t))))
1074 1094
1075(setup (:straight (bongo :type git 1095(setup (:straight (bongo :type git
1076 :flavor melpa 1096 :flavor melpa
@@ -1165,8 +1185,8 @@
1165 '(t)))))) 1185 '(t))))))
1166 1186
1167(setup (:straight circe) 1187(setup (:straight circe)
1168 ;; (:require _circe 1188 (:require _circe
1169 ;; +circe) 1189 +circe)
1170 ;; (:also-load circe-chanop) 1190 ;; (:also-load circe-chanop)
1171 ;; (+ensure-after-init (lambda () (defalias 'irc '+irc "Start IRC."))) 1191 ;; (+ensure-after-init (lambda () (defalias 'irc '+irc "Start IRC.")))
1172 1192
@@ -1499,6 +1519,11 @@
1499(setup (:straight dired-open) 1519(setup (:straight dired-open)
1500 (:load-after dired)) 1520 (:load-after dired))
1501 1521
1522(setup (:straight dired-rsync)
1523 (:load-after dired)
1524 (:bind-into dired-mode
1525 "r" #'dired-rsync))
1526
1502(setup (:straight dired-subtree) 1527(setup (:straight dired-subtree)
1503 (:load-after dired) 1528 (:load-after dired)
1504 (:bind-into dired 1529 (:bind-into dired
@@ -1702,6 +1727,12 @@
1702 (:+key "C-=" #'er/expand-region 1727 (:+key "C-=" #'er/expand-region
1703 "C--" #'+er/contract-or-negative-argument)) 1728 "C--" #'+er/contract-or-negative-argument))
1704 1729
1730(setup (:straight fennel-mode)
1731 (with-eval-after-load 'apheleia
1732 (when-let ((fnlfmt (executable-find "fnlfmt")))
1733 (setf (alist-get 'fnlfmt apheleia-formatters) (list fnlfmt 'filepath))
1734 (setf (alist-get 'fennel-mode apheleia-mode-alist) 'fnlfmt))))
1735
1705(setup (:straight (filldent :host nil 1736(setup (:straight (filldent :host nil
1706 :repo "https://codeberg.org/acdw/filldent.el")) 1737 :repo "https://codeberg.org/acdw/filldent.el"))
1707 (:+key "M-q" #'filldent-unfill-toggle)) 1738 (:+key "M-q" #'filldent-unfill-toggle))
@@ -1769,6 +1800,10 @@
1769 (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal) 1800 (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal)
1770 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))) 1801 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n")))
1771 1802
1803(setup (:straight (ghelp :repo "https://github.com/casouri/ghelp"))
1804 ;;; XXX: set this up!
1805 (:require))
1806
1772(setup (:straight (git-modes :host github :repo "magit/git-modes")) 1807(setup (:straight (git-modes :host github :repo "magit/git-modes"))
1773 (:require git-modes)) 1808 (:require git-modes))
1774 1809
@@ -1801,7 +1836,10 @@
1801 (:option hungry-delete-chars-to-skip " \t" 1836 (:option hungry-delete-chars-to-skip " \t"
1802 hungry-delete-join-reluctantly nil) 1837 hungry-delete-join-reluctantly nil)
1803 (+with-ensure-after-init 1838 (+with-ensure-after-init
1804 (add-to-list 'hungry-delete-except-modes 'eshell-mode)) 1839 (dolist (m '(eshell-mode
1840 nim-mode
1841 python-mode))
1842 (add-to-list 'hungry-delete-except-modes m)))
1805 (:bind-into paredit 1843 (:bind-into paredit
1806 ;; I define these functions here because they really require both packages 1844 ;; I define these functions here because they really require both packages
1807 ;; to make any sense. So, would I put them in `+hungry-delete' or 1845 ;; to make any sense. So, would I put them in `+hungry-delete' or
@@ -1907,15 +1945,16 @@
1907 ('dark 1.0))) 1945 ('dark 1.0)))
1908 (+mapc-some-buffers #'+jabber-colors-update 1946 (+mapc-some-buffers #'+jabber-colors-update
1909 (lambda () (derived-mode-p 'jabber-chat-mode 1947 (lambda () (derived-mode-p 'jabber-chat-mode
1910 'jabber-roster-mode 1948 'jabber-roster-mode
1911 'jabber-activity-mode 1949 'jabber-activity-mode
1912 'jabber-browse-mode))))) 1950 'jabber-browse-mode)))))
1913 (dolist (mode '(jabber-chat-mode 1951 (dolist (mode '(jabber-chat-mode
1914 jabber-browse-mode 1952 jabber-browse-mode
1915 jabber-roster-mode 1953 jabber-roster-mode
1916 jabber-console-mode)) 1954 jabber-console-mode))
1917 (let ((hook (intern (format "%s-hook" mode)))) 1955 (let ((hook (intern (format "%s-hook" mode))))
1918 (add-hook hook #'visual-fill-column-mode) 1956 (add-hook hook #'visual-fill-column-mode)
1957 (add-hook hook (defun +electric-pair-disable-local-mode () (electric-pair-local-mode -1)))
1919 ;; (add-hook hook (lambda () (setq-local wrap-prefix " "))) 1958 ;; (add-hook hook (lambda () (setq-local wrap-prefix " ")))
1920 )) 1959 ))
1921 (with-eval-after-load 'tracking 1960 (with-eval-after-load 'tracking
@@ -1927,7 +1966,8 @@
1927 "🤔 "))) 1966 "🤔 ")))
1928 file-percentage-mode nil 1967 file-percentage-mode nil
1929 ;; wrap-prefix (make-string +jabber-ws-prefix ?\ ) 1968 ;; wrap-prefix (make-string +jabber-ws-prefix ?\ )
1930 comment-start nil)) 1969 comment-start nil)
1970 (:bind "C-c C-t" #'jabber-muc-set-topic))
1931 (:+leader "C-j" jabber-global-keymap) 1971 (:+leader "C-j" jabber-global-keymap)
1932 (advice-add 'jabber-activity-add :after #'+jabber-tracking-add) 1972 (advice-add 'jabber-activity-add :after #'+jabber-tracking-add)
1933 (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc) 1973 (advice-add 'jabber-activity-add-muc :after #'+jabber-tracking-add-muc)
@@ -1955,7 +1995,8 @@
1955 (:require +link-hint) 1995 (:require +link-hint)
1956 (+link-hint-open-secondary-setup) 1996 (+link-hint-open-secondary-setup)
1957 (+link-hint-open-chrome-setup) 1997 (+link-hint-open-chrome-setup)
1958 (:option link-hint-avy-style 'at-full) 1998 (:option link-hint-avy-style 'at-full
1999 link-hint-avy-all-windows t)
1959 (:+key "M-l" +link-hint-map) 2000 (:+key "M-l" +link-hint-map)
1960 (:with-map +link-hint-map 2001 (:with-map +link-hint-map
1961 (:bind "M-l" #'+link-hint-open-link "l" #'+link-hint-open-link 2002 (:bind "M-l" #'+link-hint-open-link "l" #'+link-hint-open-link
@@ -2006,7 +2047,7 @@
2006 (:hook #'visual-fill-column-mode)) 2047 (:hook #'visual-fill-column-mode))
2007 (with-eval-after-load 'apheleia 2048 (with-eval-after-load 'apheleia
2008 (when-let ((mdfmt-exe (executable-find "markdownfmt"))) 2049 (when-let ((mdfmt-exe (executable-find "markdownfmt")))
2009 (setf (alist-get 'markdownfmt apheleia-formatters) mdfmt-exe) 2050 (setf (alist-get 'markdownfmt apheleia-formatters) (list mdfmt-exe))
2010 (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt) 2051 (setf (alist-get 'markdown-mode apheleia-mode-alist) 'markdownfmt)
2011 (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt)))) 2052 (setf (alist-get 'gfm-mode apheleia-mode-alist) 'markdownfmt))))
2012 2053
@@ -2077,8 +2118,9 @@
2077 ((,class :inherit modus-themes-bold 2118 ((,class :inherit modus-themes-bold
2078 :foreground unspecified))) 2119 :foreground unspecified)))
2079 `(font-lock-comment-face 2120 `(font-lock-comment-face
2080 ((,class :inherit variable-pitch 2121 ((,class :inherit default
2081 :slant italic 2122 :slant normal
2123 :height 1.0
2082 :foreground ,fg-comment-yellow))) 2124 :foreground ,fg-comment-yellow)))
2083 `(font-lock-comment-delimiter-face 2125 `(font-lock-comment-delimiter-face
2084 ((,class :inherit fixed-pitch 2126 ((,class :inherit fixed-pitch
@@ -2265,7 +2307,9 @@
2265 lisp-mode-hook 2307 lisp-mode-hook
2266 scheme-mode-hook 2308 scheme-mode-hook
2267 geiser-mode-hook 2309 geiser-mode-hook
2268 geiser-repl-mode-hook)) 2310 geiser-repl-mode-hook
2311 fennel-mode-hook
2312 fennel-repl-mode-hook))
2269 (add-hook hook #'enable-paredit-mode)) 2313 (add-hook hook #'enable-paredit-mode))
2270 (:also-load eldoc) 2314 (:also-load eldoc)
2271 (eldoc-add-command #'paredit-backward-delete #'paredit-close-round)) 2315 (eldoc-add-command #'paredit-backward-delete #'paredit-close-round))
@@ -2357,6 +2401,8 @@
2357 (+modeline-concat 2401 (+modeline-concat
2358 '(+modeline-track 2402 '(+modeline-track
2359 simple-modeline-segment-misc-info)))) 2403 simple-modeline-segment-misc-info))))
2404 (lambda () (when (featurep 'dired-rsync)
2405 dired-rsync-modeline-status))
2360 ,(+modeline-concat 2406 ,(+modeline-concat
2361 '(+modeline-god-mode 2407 '(+modeline-god-mode
2362 +modeline-kmacro-indicator 2408 +modeline-kmacro-indicator
@@ -2392,7 +2438,10 @@
2392 (:also-load sly-autoloads 2438 (:also-load sly-autoloads
2393 +sly) 2439 +sly)
2394 (:option inferior-lisp-program +lisp-bin 2440 (:option inferior-lisp-program +lisp-bin
2395 sly-kill-without-query-p t) 2441 sly-kill-without-query-p t
2442 sly-command-switch-to-existing-lisp t)
2443 (:with-mode lisp-mode
2444 (:bind "C-c C-z" #'sly-mrepl))
2396 (:with-feature sly-mrepl 2445 (:with-feature sly-mrepl
2397 (dolist (key '("RET" "<return>")) 2446 (dolist (key '("RET" "<return>"))
2398 (:bind key #'sly-mrepl-return-at-end)) 2447 (:bind key #'sly-mrepl-return-at-end))
@@ -2607,6 +2656,9 @@
2607 2656
2608(setup (:straight xr)) 2657(setup (:straight xr))
2609 2658
2659(setup (:straight yaml-mode)
2660 (:file-match (rx "." (or "yml" "yaml") eos)))
2661
2610(setup (:straight yaoddmuse)) 2662(setup (:straight yaoddmuse))
2611 2663
2612(setup (:straight yasnippet) 2664(setup (:straight yasnippet)