summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-10-01 19:06:13 -0500
committerCase Duckworth2021-10-01 19:06:13 -0500
commit3a82a01e91ffedac244e2ebdc006a313099e32f3 (patch)
tree15ce2ba964a70c2bd55cc1bb8d744867f7a31b02
parentChange fonts (diff)
downloademacs-3a82a01e91ffedac244e2ebdc006a313099e32f3.tar.gz
emacs-3a82a01e91ffedac244e2ebdc006a313099e32f3.zip
Blep
-rw-r--r--init.el136
1 files changed, 104 insertions, 32 deletions
diff --git a/init.el b/init.el index ec2162a..9c3b03b 100644 --- a/init.el +++ b/init.el
@@ -317,6 +317,19 @@
317 "C-c C-k" #'acdw/eval-region-or-buffer 317 "C-c C-k" #'acdw/eval-region-or-buffer
318 "C-c C-z" #'ielm))) 318 "C-c C-z" #'ielm)))
319 319
320(setup pulse
321 (:option pulse-flag nil)
322
323 (defun pulse-line (&rest _)
324 "Pulse the current line."
325 (pulse-momentary-highlight-one-line (point)))
326
327 (dolist (command '(scroll-up-command
328 scroll-down-command
329 recenter-top-bottom other-window
330 switch-to-buffer))
331 (advice-add command :after #'pulse-line)))
332
320(setup emacs 333(setup emacs
321 ;; "Et cetera" settings 334 ;; "Et cetera" settings
322 ;; This should stay as /minimal/ as possible. Anything that can go somewhere 335 ;; This should stay as /minimal/ as possible. Anything that can go somewhere
@@ -481,6 +494,11 @@
481 "M-n" nil 494 "M-n" nil
482 "M-p" nil)) 495 "M-p" nil))
483 496
497(setup executable
498 (:option executable-prefix-env t)
499 (add-hook 'after-save-hook
500 #'executable-make-buffer-file-executable-if-script-p))
501
484(setup files 502(setup files
485 (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t)) 503 (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t))
486 auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t) 504 auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t)
@@ -965,7 +983,7 @@ specific to most general, they are these:
965 :host github 983 :host github
966 :repo "raxod502/apheleia")) 984 :repo "raxod502/apheleia"))
967 985
968 (:also-load acdw-apheleia) 986 (require 'acdw-apheleia)
969 (add-hook 'before-save-hook #'apheleia-dumb-auto-format) 987 (add-hook 'before-save-hook #'apheleia-dumb-auto-format)
970 988
971 ;; Aphelia can't find prettier on Windows (though I 989 ;; Aphelia can't find prettier on Windows (though I
@@ -1032,7 +1050,7 @@ specific to most general, they are these:
1032 :host "piss.hmm.st")) 1050 :host "piss.hmm.st"))
1033 ("Twitch IRC" :host "irc.chat.twitch.tv" :port 6697 :use-tls t 1051 ("Twitch IRC" :host "irc.chat.twitch.tv" :port 6697 :use-tls t
1034 :nick "caseofducks" :user "caseofducks" 1052 :nick "caseofducks" :user "caseofducks"
1035 :pass ,(acdw/make-password-fetcher))) 1053 :pass ,(acdw/make-password-fetcher :host "irc.chat.twitch.tv")))
1036 circe-reduce-lurker-spam t 1054 circe-reduce-lurker-spam t
1037 circe-server-auto-join-default-type :after-auth 1055 circe-server-auto-join-default-type :after-auth
1038 circe-server-buffer-action (lambda (buf) 1056 circe-server-buffer-action (lambda (buf)
@@ -1059,7 +1077,7 @@ specific to most general, they are these:
1059 #'enable-circe-new-day-notifier 1077 #'enable-circe-new-day-notifier
1060 #'circe-chat@set-prompt 1078 #'circe-chat@set-prompt
1061 #'topsy-mode)) 1079 #'topsy-mode))
1062 (:bind "C-c C-s" #'circe-command-SLAP) 1080 (:bind "C-c C-s" #'circe-command-SLAP)
1063 1081
1064 (autoload 'circe-nick-color-reset "circe-color-nicks") 1082 (autoload 'circe-nick-color-reset "circe-color-nicks")
1065 (add-hook 'modus-themes-after-load-theme-hook 1083 (add-hook 'modus-themes-after-load-theme-hook
@@ -1189,8 +1207,8 @@ specific to most general, they are these:
1189 (crux-reopen-as-root-mode +1)) 1207 (crux-reopen-as-root-mode +1))
1190 1208
1191(setup (:straight-if (define-repeat-map 1209(setup (:straight-if (define-repeat-map
1192 :host nil 1210 :host nil
1193 :repo "https://tildegit.org/acdw/define-repeat-map.el") 1211 :repo "https://tildegit.org/acdw/define-repeat-map.el")
1194 (acdw/system :home)) 1212 (acdw/system :home))
1195 1213
1196 (require 'define-repeat-map ; just for me 1214 (require 'define-repeat-map ; just for me
@@ -1256,7 +1274,9 @@ specific to most general, they are these:
1256 (autoload 'global-dictionary-tooltip-mode "dictionary" 1274 (autoload 'global-dictionary-tooltip-mode "dictionary"
1257 "Enable/disable dictionary-tooltip-mode for all buffers" t) 1275 "Enable/disable dictionary-tooltip-mode for all buffers" t)
1258 1276
1259 (define-key lookup-map "d" #'dictionary-search)) 1277 (define-key lookup-map "d" #'dictionary-search)
1278
1279 (:hook #'reading-mode))
1260 1280
1261(setup (:straight (dogears 1281(setup (:straight (dogears
1262 :host github 1282 :host github
@@ -1456,11 +1476,6 @@ specific to most general, they are these:
1456 (:hook-into emacs-lisp-mode 1476 (:hook-into emacs-lisp-mode
1457 lisp-interaction-mode)) 1477 lisp-interaction-mode))
1458 1478
1459(setup executable
1460 (:option executable-prefix-env t)
1461 (add-hook 'after-save-hook
1462 #'executable-make-buffer-file-executable-if-script-p))
1463
1464(setup (:straight-if exec-path-from-shell 1479(setup (:straight-if exec-path-from-shell
1465 (acdw/system :home)) 1480 (acdw/system :home))
1466 (when (daemonp) 1481 (when (daemonp)
@@ -1593,10 +1608,17 @@ specific to most general, they are these:
1593 ("▬▬▬▬▬▬▬▋ Ò╭╮Ó" "hammer") 1608 ("▬▬▬▬▬▬▬▋ Ò╭╮Ó" "hammer")
1594 ("👁👄👁" "lewk") 1609 ("👁👄👁" "lewk")
1595 ("( ͡~ ͜ʖ ͡°)" "wink") 1610 ("( ͡~ ͜ʖ ͡°)" "wink")
1611 (" (づ ̄ ³ ̄)づ " "party")
1596 ("⊙﹏⊙" "uhhh" "unsure"))) 1612 ("⊙﹏⊙" "uhhh" "unsure")))
1597 (add-to-list 'kaomoji-insert-alist km)) 1613 (add-to-list 'kaomoji-insert-alist km))
1598 (:global "C-x 8 k" #'kaomoji-insert)) 1614 (:global "C-x 8 k" #'kaomoji-insert))
1599 1615
1616;; (setup (:straight wrap-region)
1617;; (:hook-into org-mode)
1618;; (with-eval-after-load 'org
1619;; (dolist (punc '("=" "*" "/" "_" "+"))
1620;; (wrap-region-add-wrapper punc punc nil 'org-mode))))
1621
1600(setup (:straight lacarte) 1622(setup (:straight lacarte)
1601 (:global "<f10>" #'lacarte-execute-menu-command)) 1623 (:global "<f10>" #'lacarte-execute-menu-command))
1602 1624
@@ -1708,11 +1730,13 @@ browser defined in `browse-url-secondary-browser-function'."
1708 :repo "protesilaos/modus-themes")) 1730 :repo "protesilaos/modus-themes"))
1709 (:option modus-themes-slanted-constructs t 1731 (:option modus-themes-slanted-constructs t
1710 modus-themes-bold-constructs t 1732 modus-themes-bold-constructs t
1711 modus-themes-region 'bg-only 1733 modus-themes-fringes nil
1712 modus-themes-org-blocks 'grayscale 1734 modus-themes-mode-line '(borderless moody)
1713 modus-themes-headings '((1 . section) 1735 modus-themes-region '(bg-only no-extend)
1714 (t . no-color)) 1736 modus-themes-org-blocks 'gray-background
1715 modus-themes-mode-line nil) 1737 modus-themes-headings '((t . (background)))
1738 modus-themes-lang-checkers '(straight-underline)
1739 modus-themes-scale-headings nil)
1716 1740
1717 (acdw/sunrise-sunset #'modus-themes-load-operandi 1741 (acdw/sunrise-sunset #'modus-themes-load-operandi
1718 #'modus-themes-load-vivendi) 1742 #'modus-themes-load-vivendi)
@@ -1720,9 +1744,54 @@ browser defined in `browse-url-secondary-browser-function'."
1720 (add-hook 'modus-themes-after-load-theme-hook 1744 (add-hook 'modus-themes-after-load-theme-hook
1721 (defun modus-themes@customize-faces () 1745 (defun modus-themes@customize-faces ()
1722 "Customize faces of modus-themes." 1746 "Customize faces of modus-themes."
1723 (custom-set-faces 1747 (dolist (face '(font-lock-builtin-face
1724 '(org-tag 1748 ;; font-lock-comment-delimiter-face
1725 ((t (:height 90 :slant italic :inherit org-tag)))))))) 1749 ;; font-lock-coment-face
1750 font-lock-constant-face
1751 ;; font-lock-doc-face
1752 font-lock-function-name-face
1753 font-lock-keyword-face
1754 font-lock-negation-char-face
1755 font-lock-preprocessor-face
1756 font-lock-regexp-grouping-backslash
1757 font-lock-regexp-goruping-construct
1758 font-lock-string-face
1759 font-lock-type-face
1760 font-lock-variable-name-face
1761 font-lock-warning-face))
1762 (modus-themes-with-colors
1763 (custom-set-faces
1764 `(,face
1765 ((,class :foreground ,fg-main
1766 :weight normal
1767 :slant normal))))))
1768 ;; Other faces
1769 (modus-themes-with-colors
1770 (custom-set-faces
1771 `(org-level-1
1772 ((,class :inherit (modus-themes-heading-1 fixed-pitch)
1773 :extend t)))
1774 `(org-level-2
1775 ((,class :inherit (modus-themes-heading-2 fixed-pitch)
1776 :extend t)))
1777 `(org-level-3
1778 ((,class :inherit (modus-themes-heading-3 fixed-pitch)
1779 :extend t)))
1780 `(org-level-4
1781 ((,class :inherit (modus-themes-heading-4 fixed-pitch)
1782 :extend t)))
1783 `(org-level-5
1784 ((,class :inherit (modus-themes-heading-5 fixed-pitch)
1785 :extend t)))
1786 `(org-level-6
1787 ((,class :inherit (modus-themes-heading-6 fixed-pitch)
1788 :extend t)))
1789 `(org-level-7
1790 ((,class :inherit (modus-themes-heading-7 fixed-pitch)
1791 :extend t)))
1792 `(org-level-8
1793 ((,class :inherit (modus-themes-heading-8 fixed-pitch)
1794 :extend t))))))))
1726 1795
1727(setup (:straight mwim) 1796(setup (:straight mwim)
1728 (:global "C-a" #'mwim-beginning 1797 (:global "C-a" #'mwim-beginning
@@ -1742,17 +1811,6 @@ browser defined in `browse-url-secondary-browser-function'."
1742 indicate-buffer-boundaries nil) 1811 indicate-buffer-boundaries nil)
1743 (acdw/setup-fringes))))) 1812 (acdw/setup-fringes)))))
1744 1813
1745(setup (:straight visual-fill-column)
1746 (:option visual-fill-column-width (+ fill-column 4)
1747 visual-fill-column-center-text t
1748 (append reading-modes) '(visual-fill-column-mode . +1))
1749 (:hook (defun visual-fill-column@setup ()
1750 (if visual-fill-column-mode
1751 (setq-local indicate-empty-lines nil
1752 indicate-buffer-boundaries nil)
1753 (acdw/setup-fringes))))
1754 (:advise text-scale-adjust :after #'visual-fill-column-adjust))
1755
1756(setup (:straight (orderless 1814(setup (:straight (orderless
1757 :host github 1815 :host github
1758 :repo "oantolin/orderless")) 1816 :repo "oantolin/orderless"))
@@ -1867,7 +1925,7 @@ browser defined in `browse-url-secondary-browser-function'."
1867 org-src-window-setup 'current-window 1925 org-src-window-setup 'current-window
1868 org-startup-truncated nil 1926 org-startup-truncated nil
1869 org-startup-with-inline-images t 1927 org-startup-with-inline-images t
1870 org-tags-column 0) 1928 org-tags-column (- fill-column))
1871 1929
1872 (:bind "RET" #'acdw-org/return-dwim 1930 (:bind "RET" #'acdw-org/return-dwim
1873 "<S-return>" #'acdw-org/org-table-copy-down 1931 "<S-return>" #'acdw-org/org-table-copy-down
@@ -1886,7 +1944,6 @@ browser defined in `browse-url-secondary-browser-function'."
1886 #'org-export-remove-zero-width-spaces)) 1944 #'org-export-remove-zero-width-spaces))
1887 1945
1888 (:hook #'variable-pitch-mode 1946 (:hook #'variable-pitch-mode
1889 #'olivetti-mode
1890 1947
1891 ;; This is super ugly because I need to add a function to 1948 ;; This is super ugly because I need to add a function to
1892 ;; `before-save-hook', but only in org-mode buffers. So I make a hook 1949 ;; `before-save-hook', but only in org-mode buffers. So I make a hook
@@ -1995,6 +2052,9 @@ the default is \"/\"."
1995 org-appear-delay 0) 2052 org-appear-delay 0)
1996 (:hook-into org-mode)) 2053 (:hook-into org-mode))
1997 2054
2055(setup (:straight org-sticky-header)
2056 (:hook-into org-mode))
2057
1998(setup (:straight package-lint)) 2058(setup (:straight package-lint))
1999 2059
2000(setup (:straight package-lint-flymake)) 2060(setup (:straight package-lint-flymake))
@@ -2255,6 +2315,18 @@ If used with a numeric prefix argument N, N backticks will be inserted."
2255 "M-DEL" #'vertico-directory-delete-word)) 2315 "M-DEL" #'vertico-directory-delete-word))
2256 (add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)) 2316 (add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy))
2257 2317
2318(setup (:straight visual-fill-column)
2319 (:option visual-fill-column-width (+ fill-column 4)
2320 visual-fill-column-center-text t
2321 (append reading-modes) '(visual-fill-column-mode . +1))
2322 (:hook-into org-mode)
2323 (:hook (defun visual-fill-column@setup ()
2324 (if visual-fill-column-mode
2325 (setq-local indicate-empty-lines nil
2326 indicate-buffer-boundaries nil)
2327 (acdw/setup-fringes))))
2328 (:advise text-scale-adjust :after #'visual-fill-column-adjust))
2329
2258(setup (:straight visual-regexp) 2330(setup (:straight visual-regexp)
2259 (:global "M-%" #'vr/query-replace)) 2331 (:global "M-%" #'vr/query-replace))
2260 2332