summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el62
-rw-r--r--lisp/+emacs.el6
-rw-r--r--lisp/+ispell.el34
-rw-r--r--lisp/+jabber.el3
4 files changed, 79 insertions, 26 deletions
diff --git a/init.el b/init.el index 526f2dd..d2c41dd 100644 --- a/init.el +++ b/init.el
@@ -402,7 +402,9 @@
402 402
403(setup ispell 403(setup ispell
404 (:also-load +ispell) 404 (:also-load +ispell)
405 (put 'ispell-buffer-session-localwords 'safe-local-variable #'+ispell-safe-local-p)) 405 (put 'ispell-buffer-session-localwords
406 'safe-local-variable #'+ispell-safe-local-p)
407 (add-hook 'user-save-hook #'+ispell-move-buffer-words-to-dir-locals-hook))
406 408
407(setup kmacro 409(setup kmacro
408 (:also-load +kmacro) 410 (:also-load +kmacro)
@@ -1093,7 +1095,8 @@ See also `crux-reopen-as-root-mode'."
1093 1095
1094(setup (:straight electric-cursor) 1096(setup (:straight electric-cursor)
1095 (:option electric-cursor-alist '((overwrite-mode . hbar) 1097 (:option electric-cursor-alist '((overwrite-mode . hbar)
1096 (god-local-mode . box))) 1098 (god-local-mode . box)
1099 (t . bar)))
1097 (electric-cursor-mode +1)) 1100 (electric-cursor-mode +1))
1098 1101
1099(setup (:straight elfeed) 1102(setup (:straight elfeed)
@@ -1164,10 +1167,35 @@ See also `crux-reopen-as-root-mode'."
1164 1167
1165(setup (:straight emms) 1168(setup (:straight emms)
1166 ;; TODO: Definitely need to do more customization here 1169 ;; TODO: Definitely need to do more customization here
1167 (:option emms-source-file-default-directory "~/var/music/") 1170 (:option emms-source-file-default-directory "~/var/music/"
1171 emms-player-mpv-update-metadata t
1172 emms-player-mpv-ipc-method 'file)
1168 (require 'emms-setup) 1173 (require 'emms-setup)
1169 (emms-all) 1174 (emms-all)
1170 (emms-default-players)) 1175 (emms-default-players)
1176 ;; Streaming
1177 (require 'emms-streams)
1178 (:option emms-streams-file (sync/ "emacs/streams.emms"))
1179 ;; Mode line
1180 (:option emms-mode-line-icon-enabled-p t
1181 emms-mode-line-format "%s"
1182 emms-mode-line-mode-line-function ;#'emms-mode-line-icon-function
1183 (defun +emms-mode-line-truncate ()
1184 (let ((current-trunc (concat "[ "
1185 (+string-truncate
1186 (emms-mode-line-playlist-current)
1187 24)
1188 " ] ")))
1189 (if emms-mode-line-icon-enabled-p
1190 (concat " "
1191 emms-mode-line-icon-before-format
1192 (emms-propertize "🎵:" 'display
1193 (emms-mode-line-icon-generate
1194 emms-mode-line-icon-color))
1195 current-trunc)
1196 current-trunc))))
1197 (emms-mode-line-mode +1)
1198 (emms-playing-time-mode -1))
1171 1199
1172(setup (:straight epithet) 1200(setup (:straight epithet)
1173 (dolist (hook '(Info-selection-hook 1201 (dolist (hook '(Info-selection-hook
@@ -1223,15 +1251,17 @@ See also `crux-reopen-as-root-mode'."
1223 :repo "duckwork/filldent.el")) 1251 :repo "duckwork/filldent.el"))
1224 (:+key "M-q" #'filldent-dwim)) 1252 (:+key "M-q" #'filldent-dwim))
1225 1253
1226(setup (:straight flyspell-correct) 1254(setup (:straight (flyspell-correct
1255 :fork (:host github :repo "duckwork/flyspell-correct"
1256 :branch "metadata-category")))
1227 (:load-after flyspell) 1257 (:load-after flyspell)
1228 (:also-load +flyspell-correct) 1258 (:also-load +flyspell-correct)
1229 (:option flyspell-correct--cr-key ";") 1259 (:option flyspell-correct--cr-key ";")
1230 (:bind-into flyspell 1260 (:bind-into flyspell
1231 "C-;" #'flyspell-correct-wrapper 1261 "C-;" #'flyspell-correct-wrapper
1232 "<f7>" #'+flyspell-correct-buffer) 1262 "<f7>" #'+flyspell-correct-buffer)
1233 (with-eval-after-load 'vertico-multiform 1263 (+with-ensure-after-init ; vertico-multiform
1234 (setf (alist-get 'flyspell-correct-wrapper vertico-multiform-commands) nil))) 1264 (setf (alist-get 'flyspell vertico-multiform-categories) nil)))
1235 1265
1236(setup (:straight-when (forge 1266(setup (:straight-when (forge
1237 :host github :repo "magit/forge") 1267 :host github :repo "magit/forge")
@@ -1358,9 +1388,9 @@ See also `crux-reopen-as-root-mode'."
1358 :host nil))) 1388 :host nil)))
1359 (:also-load +jabber) 1389 (:also-load +jabber)
1360 (:option jabber-account-list '(("acdw@hmm.st")) 1390 (:option jabber-account-list '(("acdw@hmm.st"))
1361 jabber-groupchat-buffer-format "%n" 1391 jabber-groupchat-buffer-format "xmpp:%n"
1362 jabber-chat-buffer-format "%n" 1392 jabber-chat-buffer-format "xmpp:%n"
1363 jabber-muc-private-buffer-format "%n (%g)" 1393 jabber-muc-private-buffer-format "xmpp:%n(%g)"
1364 jabber-activity-show-p #'ignore) 1394 jabber-activity-show-p #'ignore)
1365 (dolist (mode '(jabber-chat-mode 1395 (dolist (mode '(jabber-chat-mode
1366 jabber-browse-mode 1396 jabber-browse-mode
@@ -1725,7 +1755,10 @@ See also `crux-reopen-as-root-mode'."
1725 (completion-at-point flat) 1755 (completion-at-point flat)
1726 (indent-for-tab-command flat) 1756 (indent-for-tab-command flat)
1727 (consult-buffer flat) 1757 (consult-buffer flat)
1728 (insert-char)) 1758 (insert-char)
1759 (flyspell-correct-wrapper)
1760 (+flyspell-correct-buffer)
1761 (flyspell-correct-move))
1729 ;; This is applied /after/ the above, so default is at the end of 1762 ;; This is applied /after/ the above, so default is at the end of
1730 ;; this alist. 1763 ;; this alist.
1731 vertico-multiform-categories '((file buffer grid) 1764 vertico-multiform-categories '((file buffer grid)
@@ -1824,3 +1857,10 @@ See also `crux-reopen-as-root-mode'."
1824 (:require +zzz-to-char) 1857 (:require +zzz-to-char)
1825 (:option zzz-to-char-reach (+bytes 1 :kib)) 1858 (:option zzz-to-char-reach (+bytes 1 :kib))
1826 (:global "M-z" #'+zzz-to-char)) 1859 (:global "M-z" #'+zzz-to-char))
1860
1861(setup (:straight org-download)
1862 (:option org-download-method 'attach
1863 org-download-backend (cond ((executable-find "curl") 'curl)
1864 ((executable-find "wget") 'wget)
1865 (:else 'url-retrieve)))
1866 (add-hook 'dired-mode-hook 'org-download-enable))
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index 1679886..b40e9c4 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el
@@ -92,9 +92,9 @@ Do this only if the buffer is not visiting a file."
92 native-comp-deferred-compilation nil 92 native-comp-deferred-compilation nil
93 read-answer-short t 93 read-answer-short t
94 read-buffer-completion-ignore-case t 94 read-buffer-completion-ignore-case t
95 read-extended-command-predicate (when (fboundp 95 ;; read-extended-command-predicate (when (fboundp
96 'command-completion-default-include-p) 96 ;; 'command-completion-default-include-p)
97 'command-completion-default-include-p) 97 ;; 'command-completion-default-include-p)
98 recenter-positions '(top middle bottom) 98 recenter-positions '(top middle bottom)
99 regexp-search-ring-max 100 99 regexp-search-ring-max 100
100 regexp-search-ring-max 200 100 regexp-search-ring-max 200
diff --git a/lisp/+ispell.el b/lisp/+ispell.el index e35b2f1..c3ee417 100644 --- a/lisp/+ispell.el +++ b/lisp/+ispell.el
@@ -49,26 +49,31 @@ before the LISTS."
49 (push string words)))))) 49 (push string words))))))
50 words)) 50 words))
51 51
52(defun +ispell-move-buffer-words-to-dir-locals () 52;;;###autoload
53 (interactive) 53(defun +ispell-move-buffer-words-to-dir-locals (&optional arg)
54 "Move the current buffer-local words to .dir-locals.el.
55This function prompts the user to save .dir-locals.el, unless
56prefix ARG is non-nil; then it just saves them."
57 (interactive "P")
54 (unless (buffer-file-name) 58 (unless (buffer-file-name)
55 (user-error "Buffer not attached to file")) 59 (user-error "Buffer not attached to file"))
56 (hack-dir-local-variables) 60 (hack-dir-local-variables)
57 (let ((words (+ispell-buffer-local-words-list)) 61 (when-let ((new-words (+ispell-append-removing-duplicates
58 (dir-local-words (+ispell-append-removing-duplicates 62 :test #'string=
59 (alist-get 'ispell-buffer-session-localwords 63 ispell-buffer-session-localwords
60 dir-local-variables-alist) 64 (alist-get 'ispell-buffer-session-localwords
61 (alist-get 'ispell-buffer-session-localwords 65 dir-local-variables-alist)
62 file-local-variables-alist)))) 66 (alist-get 'ispell-buffer-session-localwords
67 file-local-variables-alist)
68 (+ispell-buffer-local-words-list))))
63 (save-excursion 69 (save-excursion
64 (add-dir-local-variable 70 (add-dir-local-variable
65 major-mode 71 major-mode
66 'ispell-buffer-session-localwords 72 'ispell-buffer-session-localwords
67 (setq ispell-buffer-session-localwords 73 (setq ispell-buffer-session-localwords
68 (+ispell-append-removing-duplicates 74 new-words))
69 :test #'string= 75 (when (or arg
70 dir-local-words ispell-buffer-session-localwords words))) 76 (y-or-n-p "Save .dir-locals.el?"))
71 (when (y-or-n-p "Save .dir-locals.el?")
72 (save-buffer)) 77 (save-buffer))
73 (bury-buffer)) 78 (bury-buffer))
74 (or ispell-buffer-local-name 79 (or ispell-buffer-local-name
@@ -78,5 +83,10 @@ before the LISTS."
78 (while (search-forward ispell-words-keyword nil t) 83 (while (search-forward ispell-words-keyword nil t)
79 (delete-region (point-at-bol) (1+ (point-at-eol))))))) 84 (delete-region (point-at-bol) (1+ (point-at-eol)))))))
80 85
86;;;###autoload
87(defun +ispell-move-buffer-words-to-dir-locals-hook ()
88 "Convenience function for binding to a hook."
89 (+ispell-move-buffer-words-to-dir-locals t))
90
81(provide '+ispell) 91(provide '+ispell)
82;;; +ispell.el ends here 92;;; +ispell.el ends here
diff --git a/lisp/+jabber.el b/lisp/+jabber.el index 69bc8c9..a0fdea7 100644 --- a/lisp/+jabber.el +++ b/lisp/+jabber.el
@@ -25,5 +25,8 @@ This does the same as `jabber-activity-show-p', but for the
25 (when (funcall +jabber-tracking-show-p group) 25 (when (funcall +jabber-tracking-show-p group)
26 (tracking-add-buffer buffer 'jabber-activity-face))) 26 (tracking-add-buffer buffer 'jabber-activity-face)))
27 27
28;;; TODO: Hiding presence messages:
29;; https://paste.sr.ht/~hdasch/f0ad09fbcd08e940a4fda71c2f40abc1c4efd45f
30
28(provide '+jabber) 31(provide '+jabber)
29;;; +jabber.el ends here 32;;; +jabber.el ends here