From 3a82a01e91ffedac244e2ebdc006a313099e32f3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 1 Oct 2021 19:06:13 -0500 Subject: Blep --- init.el | 136 +++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 104 insertions(+), 32 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index ec2162a..9c3b03b 100644 --- a/init.el +++ b/init.el @@ -317,6 +317,19 @@ "C-c C-k" #'acdw/eval-region-or-buffer "C-c C-z" #'ielm))) +(setup pulse + (:option pulse-flag nil) + + (defun pulse-line (&rest _) + "Pulse the current line." + (pulse-momentary-highlight-one-line (point))) + + (dolist (command '(scroll-up-command + scroll-down-command + recenter-top-bottom other-window + switch-to-buffer)) + (advice-add command :after #'pulse-line))) + (setup emacs ;; "Et cetera" settings ;; This should stay as /minimal/ as possible. Anything that can go somewhere @@ -481,6 +494,11 @@ "M-n" nil "M-p" nil)) +(setup executable + (:option executable-prefix-env t) + (add-hook 'after-save-hook + #'executable-make-buffer-file-executable-if-script-p)) + (setup files (:option auto-save-file-name-transforms `((".*" ,(acdw/dir "auto-save/" t) t)) auto-save-list-file-prefix (acdw/dir "auto-save-list/.saves-" t) @@ -965,7 +983,7 @@ specific to most general, they are these: :host github :repo "raxod502/apheleia")) - (:also-load acdw-apheleia) + (require 'acdw-apheleia) (add-hook 'before-save-hook #'apheleia-dumb-auto-format) ;; Aphelia can't find prettier on Windows (though I @@ -1032,7 +1050,7 @@ specific to most general, they are these: :host "piss.hmm.st")) ("Twitch IRC" :host "irc.chat.twitch.tv" :port 6697 :use-tls t :nick "caseofducks" :user "caseofducks" - :pass ,(acdw/make-password-fetcher))) + :pass ,(acdw/make-password-fetcher :host "irc.chat.twitch.tv"))) circe-reduce-lurker-spam t circe-server-auto-join-default-type :after-auth circe-server-buffer-action (lambda (buf) @@ -1059,7 +1077,7 @@ specific to most general, they are these: #'enable-circe-new-day-notifier #'circe-chat@set-prompt #'topsy-mode)) - (:bind "C-c C-s" #'circe-command-SLAP) + (:bind "C-c C-s" #'circe-command-SLAP) (autoload 'circe-nick-color-reset "circe-color-nicks") (add-hook 'modus-themes-after-load-theme-hook @@ -1189,8 +1207,8 @@ specific to most general, they are these: (crux-reopen-as-root-mode +1)) (setup (:straight-if (define-repeat-map - :host nil - :repo "https://tildegit.org/acdw/define-repeat-map.el") + :host nil + :repo "https://tildegit.org/acdw/define-repeat-map.el") (acdw/system :home)) (require 'define-repeat-map ; just for me @@ -1256,7 +1274,9 @@ specific to most general, they are these: (autoload 'global-dictionary-tooltip-mode "dictionary" "Enable/disable dictionary-tooltip-mode for all buffers" t) - (define-key lookup-map "d" #'dictionary-search)) + (define-key lookup-map "d" #'dictionary-search) + + (:hook #'reading-mode)) (setup (:straight (dogears :host github @@ -1456,11 +1476,6 @@ specific to most general, they are these: (:hook-into emacs-lisp-mode lisp-interaction-mode)) -(setup executable - (:option executable-prefix-env t) - (add-hook 'after-save-hook - #'executable-make-buffer-file-executable-if-script-p)) - (setup (:straight-if exec-path-from-shell (acdw/system :home)) (when (daemonp) @@ -1593,10 +1608,17 @@ specific to most general, they are these: ("▬▬▬▬▬▬▬▋ Ò╭╮Ó" "hammer") ("👁👄👁" "lewk") ("( ͡~ ͜ʖ ͡°)" "wink") + (" (づ ̄ ³ ̄)づ " "party") ("⊙﹏⊙" "uhhh" "unsure"))) (add-to-list 'kaomoji-insert-alist km)) (:global "C-x 8 k" #'kaomoji-insert)) +;; (setup (:straight wrap-region) +;; (:hook-into org-mode) +;; (with-eval-after-load 'org +;; (dolist (punc '("=" "*" "/" "_" "+")) +;; (wrap-region-add-wrapper punc punc nil 'org-mode)))) + (setup (:straight lacarte) (:global "" #'lacarte-execute-menu-command)) @@ -1708,11 +1730,13 @@ browser defined in `browse-url-secondary-browser-function'." :repo "protesilaos/modus-themes")) (:option modus-themes-slanted-constructs t modus-themes-bold-constructs t - modus-themes-region 'bg-only - modus-themes-org-blocks 'grayscale - modus-themes-headings '((1 . section) - (t . no-color)) - modus-themes-mode-line nil) + modus-themes-fringes nil + modus-themes-mode-line '(borderless moody) + modus-themes-region '(bg-only no-extend) + modus-themes-org-blocks 'gray-background + modus-themes-headings '((t . (background))) + modus-themes-lang-checkers '(straight-underline) + modus-themes-scale-headings nil) (acdw/sunrise-sunset #'modus-themes-load-operandi #'modus-themes-load-vivendi) @@ -1720,9 +1744,54 @@ browser defined in `browse-url-secondary-browser-function'." (add-hook 'modus-themes-after-load-theme-hook (defun modus-themes@customize-faces () "Customize faces of modus-themes." - (custom-set-faces - '(org-tag - ((t (:height 90 :slant italic :inherit org-tag)))))))) + (dolist (face '(font-lock-builtin-face + ;; font-lock-comment-delimiter-face + ;; font-lock-coment-face + font-lock-constant-face + ;; font-lock-doc-face + font-lock-function-name-face + font-lock-keyword-face + font-lock-negation-char-face + font-lock-preprocessor-face + font-lock-regexp-grouping-backslash + font-lock-regexp-goruping-construct + font-lock-string-face + font-lock-type-face + font-lock-variable-name-face + font-lock-warning-face)) + (modus-themes-with-colors + (custom-set-faces + `(,face + ((,class :foreground ,fg-main + :weight normal + :slant normal)))))) + ;; Other faces + (modus-themes-with-colors + (custom-set-faces + `(org-level-1 + ((,class :inherit (modus-themes-heading-1 fixed-pitch) + :extend t))) + `(org-level-2 + ((,class :inherit (modus-themes-heading-2 fixed-pitch) + :extend t))) + `(org-level-3 + ((,class :inherit (modus-themes-heading-3 fixed-pitch) + :extend t))) + `(org-level-4 + ((,class :inherit (modus-themes-heading-4 fixed-pitch) + :extend t))) + `(org-level-5 + ((,class :inherit (modus-themes-heading-5 fixed-pitch) + :extend t))) + `(org-level-6 + ((,class :inherit (modus-themes-heading-6 fixed-pitch) + :extend t))) + `(org-level-7 + ((,class :inherit (modus-themes-heading-7 fixed-pitch) + :extend t))) + `(org-level-8 + ((,class :inherit (modus-themes-heading-8 fixed-pitch) + :extend t)))))))) (setup (:straight mwim) (:global "C-a" #'mwim-beginning @@ -1742,17 +1811,6 @@ browser defined in `browse-url-secondary-browser-function'." indicate-buffer-boundaries nil) (acdw/setup-fringes))))) -(setup (:straight visual-fill-column) - (:option visual-fill-column-width (+ fill-column 4) - visual-fill-column-center-text t - (append reading-modes) '(visual-fill-column-mode . +1)) - (:hook (defun visual-fill-column@setup () - (if visual-fill-column-mode - (setq-local indicate-empty-lines nil - indicate-buffer-boundaries nil) - (acdw/setup-fringes)))) - (:advise text-scale-adjust :after #'visual-fill-column-adjust)) - (setup (:straight (orderless :host github :repo "oantolin/orderless")) @@ -1867,7 +1925,7 @@ browser defined in `browse-url-secondary-browser-function'." org-src-window-setup 'current-window org-startup-truncated nil org-startup-with-inline-images t - org-tags-column 0) + org-tags-column (- fill-column)) (:bind "RET" #'acdw-org/return-dwim "" #'acdw-org/org-table-copy-down @@ -1886,7 +1944,6 @@ browser defined in `browse-url-secondary-browser-function'." #'org-export-remove-zero-width-spaces)) (:hook #'variable-pitch-mode - #'olivetti-mode ;; This is super ugly because I need to add a function to ;; `before-save-hook', but only in org-mode buffers. So I make a hook @@ -1995,6 +2052,9 @@ the default is \"/\"." org-appear-delay 0) (:hook-into org-mode)) +(setup (:straight org-sticky-header) + (:hook-into org-mode)) + (setup (:straight package-lint)) (setup (:straight package-lint-flymake)) @@ -2255,6 +2315,18 @@ If used with a numeric prefix argument N, N backticks will be inserted." "M-DEL" #'vertico-directory-delete-word)) (add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)) +(setup (:straight visual-fill-column) + (:option visual-fill-column-width (+ fill-column 4) + visual-fill-column-center-text t + (append reading-modes) '(visual-fill-column-mode . +1)) + (:hook-into org-mode) + (:hook (defun visual-fill-column@setup () + (if visual-fill-column-mode + (setq-local indicate-empty-lines nil + indicate-buffer-boundaries nil) + (acdw/setup-fringes)))) + (:advise text-scale-adjust :after #'visual-fill-column-adjust)) + (setup (:straight visual-regexp) (:global "M-%" #'vr/query-replace)) -- cgit 1.4.1-21-gabe81