From 2d2cab9d97d3e84e5b7158181523fe2c5bbffe85 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 16 Apr 2023 17:06:41 -0500 Subject: uhhh --- init.el | 554 ++++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 368 insertions(+), 186 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index c8fb4e7..d6363ea 100644 --- a/init.el +++ b/init.el @@ -22,18 +22,39 @@ (use-package emacs ; Misc. config :config (setopt recenter-positions '(top middle bottom) - initial-scratch-message - (format "%s\n\n" - (mapconcat (lambda (s) (format ";; %s" s)) - (process-lines "fortune" "-s") - "\n"))) + initial-major-mode 'lisp-interaction-mode + initial-scratch-message ";; Emacs!\n\n" + ;; (format "%s\n\n" + ;; (mapconcat (lambda (s) (format ";; %s" s)) + ;; (process-lines "fortune" "-s") + ;; "\n")) + eval-expression-print-level nil + eval-expression-print-length nil + x-select-enable-clipboard-manager nil) + ;; TODO: move this ... elsewhere + (setopt mode-line-format + '("%e" + mode-line-front-space + ;; (:propertize ("" mode-line-mule-info + ;; mode-line-client + ;; mode-line-modified + ;; mode-line-remote) + ;; display (min-width (5.0))) + ("" mode-line-mule-info + mode-line-client + mode-line-modified + mode-line-remote) + mode-line-frame-identification + mode-line-buffer-identification + " " + mode-line-position + (vc-mode vc-mode) + " " + minions-mode-line-modes + mode-line-misc-info + mode-line-end-spaces)) (keymap-global-unset "C-\\") (keymap-global-unset "") - (add-hook 'kill-buffer-query-functions - (defun scratch@immortal () - (if (equal (buffer-name) "*scratch*") - (progn (bury-buffer) nil) - t))) (setf (alist-get "\\*Compile-Log\\*" display-buffer-alist nil nil #'equal) '(display-buffer-no-window)) (add-hook 'after-init-hook @@ -61,20 +82,28 @@ (defun first-frame@set-fonts () (remove-hook 'server-after-make-frame-hook #'first-frame@set-fonts) - (face-spec-set 'fixed-pitch - `((t :family ,(find-font "Comic Code" - "DejaVu Sans Mono") - :height 100))) - (face-spec-set 'variable-pitch - `((t :family ,(find-font "Atkinson Hyperlegible" - "DejaVu Serif") - :height 1.4))) (face-spec-set 'default - `((t :family ,(find-font "Comic Code" - "DejaVu Sans Mono") + `((t :family ,(find-font + "Recursive Mono Casual Static" + "Comic Code" + "DejaVu Sans Mono") :height 100))) + (face-spec-set 'fixed-pitch + `((t :family ,(find-font + "Recursive Mono Casual Static" + "Comic Code" + "DejaVu Sans Mono") + :height 1.0))) + (face-spec-set 'variable-pitch + `((t :family ,(find-font + "Recursive Sans Linear Static" + "Atkinson Hyperlegible" + "DejaVu Serif") + :height 1.0))) (face-spec-set 'font-lock-comment-face - `((t :slant italic))) + `((t :inherit variable-pitch))) + (face-spec-set 'font-lock-string-face + `((t :inherit variable-pitch))) ;; Emojis (cl-loop with ffl = (font-family-list) for font in '("Noto Emoji" "Noto Color Emoji" @@ -85,27 +114,28 @@ do (set-fontset-font t 'symbol font)) ;; International scripts (cl-loop with ffl = (font-family-list) - for (charset . font) in '((latin . "Noto Sans") - (han . "Noto Sans CJK SC Regular") - (kana . "Noto Sans CJK JP Regular") - (hangul . "Noto Sans CJK KR Regular") - (cjk-misc . "Noto Sans CJK KR Regular") - (khmer . "Noto Sans Khmer") - (lao . "Noto Sans Lao") - (burmese . "Noto Sans Myanmar") - (thai . "Noto Sans Thai") - (ethiopic . "Noto Sans Ethiopic") - (hebrew . "Noto Sans Hebrew") - (arabic . "Noto Sans Arabic") - (gujarati . "Noto Sans Gujarati") - (devanagari . "Noto Sans Devanagari") - (kannada . "Noto Sans Kannada") - (malayalam . "Noto Sans Malayalam") - (oriya . "Noto Sans Oriya") - (sinhala . "Noto Sans Sinhala") - (tamil . "Noto Sans Tamil") - (telugu . "Noto Sans Telugu") - (tibetan . "Noto Sans Tibetan")) + for (charset . font) + in '((latin . "Noto Sans") + (han . "Noto Sans CJK SC Regular") + (kana . "Noto Sans CJK JP Regular") + (hangul . "Noto Sans CJK KR Regular") + (cjk-misc . "Noto Sans CJK KR Regular") + (khmer . "Noto Sans Khmer") + (lao . "Noto Sans Lao") + (burmese . "Noto Sans Myanmar") + (thai . "Noto Sans Thai") + (ethiopic . "Noto Sans Ethiopic") + (hebrew . "Noto Sans Hebrew") + (arabic . "Noto Sans Arabic") + (gujarati . "Noto Sans Gujarati") + (devanagari . "Noto Sans Devanagari") + (kannada . "Noto Sans Kannada") + (malayalam . "Noto Sans Malayalam") + (oriya . "Noto Sans Oriya") + (sinhala . "Noto Sans Sinhala") + (tamil . "Noto Sans Tamil") + (telugu . "Noto Sans Telugu") + (tibetan . "Noto Sans Tibetan")) if (member font ffl) do (set-fontset-font t charset font)))) (unless (daemonp) @@ -142,14 +172,11 @@ (use-package ispell :config (setopt ispell-program-name (choose-executable "aspell" "ispell")) - (add-hook 'before-save-hook - #'+ispell-move-buffer-words-to-dir-locals-hook) + ;; (add-hook 'before-save-hook + ;; #'+ispell-move-buffer-words-to-dir-locals-hook) (put 'ispell-buffer-session-localwords 'safe-local-variable '+ispell-safe-local-p)) -(use-package flyspell - :hook org-mode-hook) - (use-package dired :bind (("C-x C-j" . dired-jump) ([remap list-directory] . dired) @@ -186,7 +213,16 @@ "localhost" "dict.org")) :bind - (("C-c d" . dictionary-search))) + (("C-c w d" . dictionary-search)) + :config + (setf (alist-get "\\*Dictionary\\*" display-buffer-alist nil nil #'equal) + '(display-buffer-in-side-window + (window-width . 80) + (side . right)))) + +(use-package calendar + :custom + (diary-file (private/ "diary"))) (use-package mouse :config @@ -261,9 +297,12 @@ ;; https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)) :hook - ((bash-ts-mode . eglot)) + ((bash-ts-mode . eglot-ensure) + (scheme-mode . eglot-ensure)) :config - (add-hook 'eglot-managed-mode . +eglot-eldoc)) + (add-to-list 'eglot-server-programs + '(scheme-mode . ("chicken-lsp-server"))) + (add-hook 'eglot-managed-mode #'+eglot-eldoc)) (use-package eldoc :config @@ -273,6 +312,76 @@ (window-height . 4))) (eldoc-add-command-completions "paredit-")) +(use-package pulse + :config + (setopt pulse-flag nil + pulse-delay 1 + pulse-iterations 1)) + +(use-package flyspell + :hook (org-mode-hook)) + +(use-package display-fill-column-indicator + :hook (prog-mode-hook)) + +(use-package package + :config + (defun package-update-async-in-progress (&rest _) + (message "Package async update in progress.")) + + (defun package-update-all-async () + "Update packages asyncronously." + (interactive) + (let ((message "Package update (async)...") + (disable-fns '(package-update + package-update-all + package-update-all-async))) + (dolist (fn disable-fns) + (advice-add fn :override #'package-update-async-in-progress)) + (message "%s" message) + (unwind-protect + (async-start + `(lambda () + (package-initialize) + (package-update-all)) + `(lambda (result) + (message "%s %s" ,message result))) + (dolist (fn ',disable-fns) + (advice-remove fn 'package-update-async-in-progress)))))) + +(use-package ielm + ;; https://www.n16f.net/blog/making-ielm-more-comfortable/ + :preface + (defun +ielm-init-history () + (let ((path (etc/ "ielm/history" t))) + (setq-local comint-input-ring-file-name path)) + (setq-local comint-input-ring-size 10000) + (setq-local comint-input-ignoredups t) + (ignore-errors (comint-read-input-ring))) + (defun +ielm-write-history (&rest _args) + (with-file-modes #o600 + (comint-write-input-ring))) + (defun +ielm (&optional buf-name) + "Interactively evaluate Emacs Lisp expressions. +Switches to the buffer named BUF-NAME if provided (`*ielm*' by default), +or creates it if it does not exist. +See `inferior-emacs-lisp-mode' for details." + (interactive) + (let (old-point + (buf-name (or buf-name "*ielm*"))) + (unless (comint-check-proc buf-name) + (with-current-buffer (get-buffer-create buf-name) + (unless (zerop (buffer-size)) (setq old-point (point))) + (inferior-emacs-lisp-mode))) + (pop-to-buffer buf-name) + (when old-point (push-mark old-point)))) + :bind (:map emacs-lisp-mode-map + ("C-c C-z" . +ielm)) + :config + (add-hook 'ielm-mode-hook #'eldoc-mode) + (add-hook 'ielm-mode-hook #'+ielm-init-history) + (advice-add 'ielm-send-input :after #'+ielm-write-history)) + ;;; Applications @@ -282,7 +391,9 @@ :bind (("C-c n" . +notmuch-goto))) (use-package acdw-org - :load-path "lisp/") + :load-path "lisp/" + :config + (global-set-key [f8] #'org-clock-out)) (use-package acdw-shell :load-path "lisp/") @@ -290,12 +401,33 @@ (use-package acdw-web :load-path "lisp/") +(use-package acdw-chat + :load-path "lisp/") + (use-package _work - :load-path "~/Sync/emacs/private/") + :load-path "~/sync/emacs/private/") ;;; Locally-developed packages +(use-package +scratch + :load-path "lisp/" + :config + (setopt +scratch-save-dir (sync/ "emacs/scratch.d/" t)) + (add-hook 'kill-buffer-query-functions #'+scratch@immortal) + (add-hook 'kill-emacs-hook #'+scratch-save-on-exit) + (with-current-buffer (get-scratch-buffer-create) + (local-set-key (kbd "C-x C-s") #'+scratch-save)) + ;; Save *scratch* every hour + (run-at-time t (* 60 60) #'+scratch-save "%FT%H%z") + ;; Clean old *scratch* saves every day + (run-at-time t (* 60 60 24) #'+scratch-clean)) + +(use-package pulse-location + :load-path "~/src/emacs/pulse-location/" + :config + (pulse-location-mode)) + (use-package dawn :load-path "~/src/emacs/dawn/" :after custom-allowed @@ -303,7 +435,41 @@ (add-hook 'custom-allowed-after-load-hook (defun dawn-modus () (dawn-schedule-themes 'modus-operandi - 'modus-vivendi)))) + 'modus-vivendi))) + (setopt modus-themes-mixed-fonts t) + (load-theme 'modus-vivendi t) + (add-hook 'dawn-after-load-theme-hook + (defun +reset-faces () + (dolist (face '(font-lock-regexp-face + font-lock-variable-name-face + font-lock-preprocessor-face + font-lock-remove-face + font-lock-delimiter-face + font-lock-label-face + font-lock-operator-face + font-lock-property-face + font-lock-builtin-face + font-lock-number-face + font-lock-set-face + font-lock-warning-face + font-lock-punctuation-face + font-lock-constant-face + font-lock-type-face + font-lock-function-name-face + font-lock-reference-face + font-lock-negation-char-face + font-lock-misc-punctuation-face + font-lock-escape-face + font-lock-bracket-face)) + (face-spec-set face '((t :foreground unspecified + :background unspecified)))) + (face-spec-set 'font-lock-keyword-face + '((t :foreground unspecified + :background unspecified + :weight bold))) + (face-spec-set 'font-lock-doc-face + '((t :slant italic))))) + (+reset-faces)) (use-package electric-cursor :load-path "~/src/emacs/electric-cursor/" @@ -345,18 +511,13 @@ With prefix ARG, toggle the value of (titlecase-region (progn (org-beginning-of-line) (point)) (progn (org-end-of-line) (point))))))) :config - (keymap-set scule-map "M-t" #'titlecase-dwim)) + (with-eval-after-load 'scule + (keymap-set scule-map "M-t" #'titlecase-dwim))) (use-package scule :load-path "~/src/emacs/scule/" - :config - (defvar-keymap scule-map - :doc "Keymap to twiddle scules." - :repeat t ; TODO: doesn't work - "M-u" #'scule-upcase - "M-l" #'scule-downcase - "M-c" #'scule-capitalize) - (keymap-global-set "M-c" scule-map) + :bind-keymap ("M-c" . scule-map) + :init ;; Use M-u for prefix keys (keymap-global-set "M-u" #'universal-argument) (keymap-set universal-argument-map "M-u" #'universal-argument-more)) @@ -372,111 +533,6 @@ With prefix ARG, toggle the value of :config (global-frowny-mode)) -(use-package jabber - :load-path "~/src/emacs/jabber/" - :preface - (defvar jabber-prefix-width 10 - "Width of jabber prompts and other prefixes.") - (defun jabber-ui-setup () - "Setup the `jabber' user interface." - (visual-fill-column-mode) - (electric-pair-local-mode -1) - (auto-fill-mode -1) - (setq-local wrap-prefix (make-string (+ 3 jabber-prefix-width) #x20) - visual-fill-column-extra-text-width `(,(+ 3 jabber-prefix-width) - . 1))) - :custom-face - (jabber-activity-face ((t :inherit jabber-chat-prompt-foreign - :foreground unspecified - :weight normal))) - (jabber-activity-personal-face ((t :inherit jabber-chat-prompt-local - :foreground unspecified - :weight bold))) - (jabber-chat-prompt-local ((t :inherit font-lock-warning-face - :foreground unspecified))) - (jabber-chat-prompt-foreign ((t :inherit font-lock-constant-face - :foreground unspecified))) - (jabber-chat-prompt-system ((t :inherit font-lock-doc-face - :foreground unspecified))) - (jabber-rare-time-face ((t :inherit font-lock-comment-face - :foreground unspecified - :underline nil))) - :bind-keymap ("C-c j" . jabber-global-keymap) - :bind (("C-c C-SPC" . jabber-activity-switch-to)) - :config - (setopt jabber-account-list '(("acdw@hmm.st")) - jabber-auto-reconnect t - jabber-last-read-marker (make-string (- fill-column 8) ?—) - jabber-muc-decorate-presence-patterns - '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$" . nil) - ("Mode #.*" . jabber-muc-presence-dim) - ("." . jabber-muc-presence-dim)) - jabber-activity-make-strings #'jabber-activity-make-strings-shorten - jabber-rare-time-format " - - - - - - %H:%M %F" - jabber-muc-header-line-format - '(" " (:eval (replace-regexp-in-string "%" "%%" - (jabber-jid-displayname - jabber-group))) - " / " jabber-muc-topic) - ;; buffer name formats - jabber-chat-buffer-format "*xmpp* %n" - jabber-browse-buffer-format "*xmpp-browse* %n" - jabber-groupchat-buffer-format "*xmpp-muc* %n" - jabber-muc-private-buffer-format "*xmpp-muc-private* %n" - ;; "prompt" (speaker) formats - jabber-groupchat-prompt-format (format "%%>%dn | " jabber-prefix-width) - jabber-chat-local-prompt-format (format "%%>%dn | " jabber-prefix-width) - jabber-chat-foreign-prompt-format (format "%%>%dn | " jabber-prefix-width) - jabber-muc-private-foreign-prompt-format "\n%g/%n | ") - ;; jabber muc nick coloring - ;; wgreenhous | I found 1.5 ok for saturation and 2.0 for value (modus) - ;; (setopt jabber-muc-nick-value 1.0 - ;; jabber-muc-nick-saturation 1.0 - ;; jabber-muc-colorize-local t - ;; jabber-muc-colorize-foreign t) - ;; When changing the above values, make sure to - ;; (setq jabber-muc-participant-colors nil) - (add-hook 'jabber-chat-mode-hook #'jabber-ui-setup) - (keymap-global-set "C-x C-j" #'dired-jump) ; Extremely annoying fix - (require 'jabber-httpupload nil t) - (add-hook 'jabber-post-connect-hooks #'jabber-enable-carbons) - (remove-hook 'jabber-alert-muc-hooks 'jabber-muc-echo) - (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo) - (add-hook 'jabber-alert-muc-hooks - (defun jabber@highlight-acdw (&optional _ _ buf _ _) - (when buf - (with-current-buffer buf - (let ((regexp (rx word-boundary - "acdw" ; maybe get from the config? - word-boundary))) - (hi-lock-unface-buffer regexp) - (highlight-regexp regexp 'font-lock-warning-face)))))) - (add-hook 'jabber-chat-mode-hook - (defun jabber-chat@leave-when-kill () - (add-hook 'kill-buffer-hook - (defun @jabber-leave@kill () - (ignore-errors - (apply #'jabber-muc-leave (jabber-muc-argument-list)))) - nil :local))) - (when (fboundp 'jabber-chat-update-focus) - (add-hook 'window-configuration-change-hook #'jabber-chat-update-focus)) - (with-eval-after-load 'consult - (defvar jabber-chat-buffer-source - `( :name "Jabber" - :hidden nil - :narrow ?j - :category buffer - :state ,#'consult--buffer-state - :items ,(lambda () - (mapcar #'buffer-name - (seq-filter (lambda (buf) - (with-current-buffer buf - (eq major-mode 'jabber-chat-mode))) - (buffer-list)))))) - (add-to-list 'consult-buffer-sources 'jabber-chat-buffer-source :append) - (consult-customize - consult-buffer :preview-key "M-."))) - (use-package keepassxc-shim :load-path "~/src/emacs/keepassxc-shim/" :config @@ -502,7 +558,7 @@ With prefix ARG, toggle the value of (use-package form-feed :ensure t - :hook (emacs-lisp-mode-hook)) + :hook (prog-mode-hook)) (use-package clean-kill-ring :vc (:url "https://github.com/NicholasBHubbard/clean-kill-ring.el") @@ -548,10 +604,11 @@ The prefix argument is as in `visual-fill-column-widen' but negated." (visual-fill-column-adjust) (message "Fill-column: %s" fill-column))) :ensure t - :init - (setopt visual-fill-column-center-text t - visual-fill-column-extra-text-width '(3 . 3)) :config + (setopt visual-fill-column-center-text t + visual-fill-column-extra-text-width '(3 . 3) + visual-fill-column-width (+ fill-column 4)) + (keymap-set toggle-map "v" #'visual-fill-column-mode) (keymap-set visual-fill-column-mode-map "C-x C->" #'visual-fill-column-widen) (keymap-set visual-fill-column-mode-map "C-x C-<" #'visual-fill-column-narrow) (add-hook 'visual-fill-column-mode-hook #'visual-line-mode) @@ -590,12 +647,12 @@ The prefix argument is as in `visual-fill-column-widen' but negated." (use-package avy :ensure t - :init - (setopt avy-background t - avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")) :bind (("M-j" . avy-goto-char-timer) :map isearch-mode-map - ("M-j" . avy-isearch))) + ("M-j" . avy-isearch)) + :config + (setopt avy-background t + avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm"))) (use-package zzz-to-char :ensure t @@ -660,8 +717,9 @@ The prefix argument is as in `visual-fill-column-widen' but negated." (call-interactively (if (derived-mode-p 'lisp-interaction-mode) #'eval-print-last-sexp #'paredit-newline)))) - (keymap-set paredit-mode-map "RET" nil) - (keymap-set paredit-mode-map "M-s" nil) + (keymap-unset paredit-mode-map "RET" t) + (keymap-unset paredit-mode-map "M-s" t) + (keymap-unset paredit-mode-map "M-r" t) (add-to-list 'paredit-space-for-delimiter-predicates (defun paredit@dont-space-@ (endp delimiter) "Don't add a space after @ in `paredit-mode'." @@ -717,10 +775,9 @@ The prefix argument is as in `visual-fill-column-widen' but negated." (use-package sly :ensure t + :when inferior-lisp-program :preface (setopt inferior-lisp-program (choose-executable "sbcl")) - :when inferior-lisp-program - :init (defun +sly-start-or-mrepl () (interactive) (if (ignore-errors (sly-connection)) @@ -754,7 +811,11 @@ The prefix argument is as in `visual-fill-column-widen' but negated." "\\.erb\\'" "\\.mustache\\'" "\\.djhtml\\'" - "\\.html?\\'")) + "\\.html?\\'") + :config + (add-hook 'web-mode-hook + (defun web-mode@setup () + (indent-tabs-mode -1)))) (use-package nginx-mode :ensure t @@ -775,6 +836,7 @@ The prefix argument is as in `visual-fill-column-widen' but negated." (pandoc-mode-hook . pandoc-load-default-settings))) (use-package edit-indirect + :ensure :bind (("C-c '" . edit-indirect-region))) (use-package transpose-frame @@ -842,9 +904,9 @@ With PREFIX, prompt to change the current dictionary." (call-interactively #'ispell-change-dictionary))) (flyspell-correct-move (point-min) :forward :rapid)) :after flyspell - :bind (:map flyspell-mode-map - ("C-;" . flyspell-correct-wrapper) - ("" . +flyspell-correct-buffer)) + :bind (("" . +flyspell-correct-buffer) + (:map flyspell-mode-map + ("C-;" . flyspell-correct-wrapper))) :config (setq flyspell-correct--cr-key ";") (keymap-unset flyspell-mode-map "C-," t) @@ -871,6 +933,10 @@ With PREFIX, prompt to change the current dictionary." :config (setopt dgi-auto-hide-details-p nil)) +(use-package expand-region ; needed for embrace anyway + :ensure t + :bind (("C-=" . er/expand-region))) + (use-package embrace :ensure t :preface @@ -961,10 +1027,25 @@ With PREFIX, prompt to change the current dictionary." ;; (setq start (point))) ;; (scheme-send-region-and-go start end)))))) -(use-package geiser-guile ; Let's try using guile instead +(use-package geiser :ensure t :config - (keymap-unset scheme-mode-map "M-o" t)) + (use-package geiser-guile :ensure t) + (use-package geiser-chicken :ensure t) + (use-package geiser-chez :ensure t) + (use-package geiser-gambit :ensure t) + (use-package geiser-chibi :ensure t) + (use-package macrostep-geiser + :ensure t + :config + (eval-after-load 'geiser-mode + '(add-hook 'geiser-mode-hook #'macrostep-geiser-setup)) + (eval-after-load 'geiser-repl + '(add-hook 'geiser-repl-mode-hook #'macrostep-geiser-setup))) + (with-eval-after-load 'geiser-mode + (keymap-set geiser-mode-map "C-c C-k" #'geiser-eval-buffer-and-go) + (keymap-unset geiser-mode-map "C-." t) + (keymap-unset scheme-mode-map "M-o" t))) (use-package treesit-auto ;; XXX: I don't really get the utility of this package, but I spent a ton of @@ -984,7 +1065,8 @@ With PREFIX, prompt to change the current dictionary." (use-package detached :when (executable-find "dtach") :ensure t - :init (detached-init) + :init + (add-hook 'after-init-hook #'detached-init) :bind (([remap async-shell-command] . detached-shell-command) ([remap compile] . detached-compile) ([remap recompile] . detached-compile-recompile)) @@ -992,3 +1074,103 @@ With PREFIX, prompt to change the current dictionary." (setf detached-terminal-data-command system-type) (with-eval-after-load 'consult (global-set-key [remap detached-open-session] #'detached-consult-session))) + +(use-package lin + :ensure t + :config + (setopt lin-face 'lin-cyan + lin-mode-hooks + '(dired-mode-hook + ;; bongo-mode-hook + ;; elfeed-search-mode-hook + git-rebase-mode-hook + grep-mode-hook + ibuffer-mode-hook + ilist-mode-hook + ;; ledger-report-mode-hook + log-view-mode-hook + magit-log-mode-hook + ;; mu4e-headers-mode-hook + notmuch-search-mode-hook + notmuch-tree-mode-hook + occur-mode-hook + org-agenda-mode-hook + pdf-outline-buffer-mode-hook + proced-mode-hook + tabulated-list-mode-hook)) + (lin-global-mode)) + +(use-package gcmh + :ensure t + :config + (setopt gcmh-idle-delay 'auto + gcmh-verbose nil) + (gcmh-mode)) + +(use-package tmr + :ensure t + :preface + (defun tmr-mode-line () + (if (seq-find (lambda (tmr) + (not (tmr--timer-finishedp tmr))) + tmr--timers) + (propertize "⏲" 'face 'font-lock-warning-face) + "")) + (add-to-list 'global-mode-string + '("" (:eval (tmr-mode-line))) + 'append)) + +;; (use-package elfeed +;; :ensure t +;; :preface +;; ;; https://karthinks.com/software/lazy-elfeed/ +;; (defun elfeed-scroll-up-command (&optional arg) +;; "Scroll up or go to next feed item in Elfeed" +;; (interactive "^P") +;; (let ((scroll-error-top-bottom nil)) +;; (condition-case-unless-debug nil +;; (scroll-up-command arg) +;; (error (elfeed-show-next))))) +;; (defun elfeed-scroll-down-command (&optional arg) +;; "Scroll up or go to next feed item in Elfeed" +;; (interactive "^P") +;; (let ((scroll-error-top-bottom nil)) +;; (condition-case-unless-debug nil +;; (scroll-down-command arg) +;; (error (elfeed-show-prev))))) +;; :bind (("C-c f" . elfeed)) +;; :config +;; (setopt elfeed-enclosure-default-dir "~/var/download/" +;; elfeed-db-directory (sync/ "emacs/elfeed/db" t) +;; elfeed-curl-max-connections 4) +;; (add-hook 'elfeed-search-update-hook #'truncate-lines-local-mode) +;; (keymap-set elfeed-show-mode-map "SPC" #'elfeed-scroll-up-command) +;; (keymap-set elfeed-show-mode-map "S-SPC" #'elfeed-scroll-down-command) +;; (keymap-set elfeed-search-mode-map "a" #'elfeed-search-untag-all-unread) +;; (setq elfeed-feeds nil) ; Always reload the feed list from feeds.opml +;; (elfeed-load-opml "~/var/feeds.opml")) + +(use-package iedit ; XXX: is this necessary? + :ensure t + :init + (customize-set-variable 'iedit-toggle-key-default (kbd "C-'"))) + +(use-package dumb-jump + :ensure t + :hook ((xref-backend-functions . dumb-jump-xref-activate))) + +(use-package le-thesaurus + :ensure t + :bind (("C-c w s" . le-thesaurus-get-synonyms) + ("C-c w a" . le-thesaurus-get-antonyms))) + +(use-package devdocs + :ensure t + ;; not sure what to bind anything to yet ... so M-x it is + ) + +(use-package comment-dwim-2 + :ensure t + :bind (("M-;" . comment-dwim-2) + :map org-mode-map + ("M-;" . org-comment-dwim-2))) -- cgit 1.4.1-21-gabe81