about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el43
-rw-r--r--lisp/+apheleia.el14
2 files changed, 41 insertions, 16 deletions
diff --git a/init.el b/init.el index a234d4e..73571f6 100644 --- a/init.el +++ b/init.el
@@ -1046,7 +1046,7 @@
1046 1046
1047(setup (:straight apheleia) 1047(setup (:straight apheleia)
1048 (:require apheleia +apheleia) 1048 (:require apheleia +apheleia)
1049 (apheleia-global-mode +1)) 1049 (+apheleia/user-save-global-mode +1))
1050 1050
1051(setup (:straight avy) 1051(setup (:straight avy)
1052 (:require avy +avy) 1052 (:require avy +avy)
@@ -1478,6 +1478,9 @@
1478 1478
1479(setup (:straight csv-mode)) 1479(setup (:straight csv-mode))
1480 1480
1481(setup (:straight denote)
1482 (:option denote-directory (expand-file-name "~/var/notes")))
1483
1481(setup (:straight dictionary) 1484(setup (:straight dictionary)
1482 (:option dictionary-use-single-buffer t) 1485 (:option dictionary-use-single-buffer t)
1483 (autoload 'dictionary-search "dictionary" 1486 (autoload 'dictionary-search "dictionary"
@@ -1859,8 +1862,9 @@
1859 "jabber-pkg.el") 1862 "jabber-pkg.el")
1860 :fork ( :host nil 1863 :fork ( :host nil
1861 :repo "https://codeberg.org/acdw/emacs-jabber"))) 1864 :repo "https://codeberg.org/acdw/emacs-jabber")))
1862 (:also-load +jabber) 1865 (:require jabber +jabber)
1863 (:option +jabber-pre-prompt "~ ~ ~\n") 1866 ;; (:option +jabber-pre-prompt "~ ~ ~\n")
1867 (add-to-list 'jabber-post-connect-hooks 'jabber-enable-carbons)
1864 (:option jabber-account-list '(("acdw@hmm.st")) 1868 (:option jabber-account-list '(("acdw@hmm.st"))
1865 jabber-groupchat-buffer-format "%n" 1869 jabber-groupchat-buffer-format "%n"
1866 jabber-chat-buffer-format "%n" 1870 jabber-chat-buffer-format "%n"
@@ -1870,18 +1874,21 @@
1870 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$") 1874 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$")
1871 ("." . jabber-muc-presence-dim)) 1875 ("." . jabber-muc-presence-dim))
1872 jabber-muc-colorize-foreign nil ; colorizing doesn't match my color theme 1876 jabber-muc-colorize-foreign nil ; colorizing doesn't match my color theme
1873 jabber-chat-foreign-prompt-format (concat +jabber-pre-prompt 1877 ;; jabber-chat-foreign-prompt-format
1874 "%n\n" 1878 ;; (concat +jabber-pre-prompt
1875 (make-string +jabber-ws-prefix 1879 ;; "%n\n"
1876 ?\ )) 1880 ;; (make-string +jabber-ws-prefix
1877 jabber-chat-local-prompt-format (concat +jabber-pre-prompt 1881 ;; ?\ ))
1878 "%n\n" 1882 ;; jabber-chat-local-prompt-format
1879 (make-string +jabber-ws-prefix 1883 ;; (concat +jabber-pre-prompt
1880 ?\ )) 1884 ;; "%n\n"
1881 jabber-groupchat-prompt-format (concat +jabber-pre-prompt 1885 ;; (make-string +jabber-ws-prefix
1882 "%n\n" 1886 ;; ?\ ))
1883 (make-string +jabber-ws-prefix 1887 ;; jabber-groupchat-prompt-format
1884 ?\ )) 1888 ;; (concat +jabber-pre-prompt
1889 ;; "%n\n"
1890 ;; (make-string +jabber-ws-prefix
1891 ;; ?\ ))
1885 jabber-auto-reconnect t) 1892 jabber-auto-reconnect t)
1886 (add-hook 'modus-themes-after-load-theme-hook 1893 (add-hook 'modus-themes-after-load-theme-hook
1887 (defun jabber-chat@after-modus-themes-load () 1894 (defun jabber-chat@after-modus-themes-load ()
@@ -1911,7 +1918,7 @@
1911 ((string-match-p "hmm@" (buffer-name)) 1918 ((string-match-p "hmm@" (buffer-name))
1912 "🤔 "))) 1919 "🤔 ")))
1913 file-percentage-mode nil 1920 file-percentage-mode nil
1914 wrap-prefix (make-string +jabber-ws-prefix ?\ ) 1921 ;; wrap-prefix (make-string +jabber-ws-prefix ?\ )
1915 comment-start nil)) 1922 comment-start nil))
1916 (:+leader "C-j" jabber-global-keymap) 1923 (:+leader "C-j" jabber-global-keymap)
1917 (advice-add 'jabber-activity-add :after #'+jabber-tracking-add) 1924 (advice-add 'jabber-activity-add :after #'+jabber-tracking-add)
@@ -2142,6 +2149,10 @@
2142 :quit "Buggy") 2149 :quit "Buggy")
2143 (:load-after notmuch)) 2150 (:load-after notmuch))
2144 2151
2152(setup (:straight (notmuch-tags
2153 :repo "https://git.madhouse-project.org/algernon/notmuch-tags.el"
2154 :fork (:repo "https://codeberg.org/acdw/notmuch-tags.el"))))
2155
2145(setup (:straight nov) 2156(setup (:straight nov)
2146 (:hook #'visual-fill-column-mode) 2157 (:hook #'visual-fill-column-mode)
2147 (:file-match (rx ".epub" eos))) 2158 (:file-match (rx ".epub" eos)))
diff --git a/lisp/+apheleia.el b/lisp/+apheleia.el index 9ed731c..3428a72 100644 --- a/lisp/+apheleia.el +++ b/lisp/+apheleia.el
@@ -3,6 +3,7 @@
3;;; Code: 3;;; Code:
4 4
5(require 'cl-lib) 5(require 'cl-lib)
6(require 'user-save)
6 7
7;; https://github.com/raxod502/apheleia/pull/63#issue-1077529623 8;; https://github.com/raxod502/apheleia/pull/63#issue-1077529623
8(cl-defun +apheleia-indent-region (&key buffer scratch formatter callback &allow-other-keys) 9(cl-defun +apheleia-indent-region (&key buffer scratch formatter callback &allow-other-keys)
@@ -13,5 +14,18 @@
13 (point-max)) 14 (point-max))
14 (funcall callback))) 15 (funcall callback)))
15 16
17(define-minor-mode +apheleia/user-save-mode
18 "Minor mode for reformatting code on `user-save'.
19Customize with `apheleia-mode-alist' and `apheleia-formatters'."
20 :lighter " Apheleia/US"
21 (if +apheleia/user-save-mode
22 (add-hook 'user-save-hook #'apheleia--format-after-save nil 'local)
23 (remove-hook 'user-save-hook #'apheleia--format-after-save 'local)))
24
25(define-globalized-minor-mode +apheleia/user-save-global-mode
26 +apheleia/user-save-mode +apheleia/user-save-mode)
27
28(put '+apheleia/user-save-mode 'safe-local-variable #'booleanp)
29
16(provide '+apheleia) 30(provide '+apheleia)
17;;; +apheleia.el ends here 31;;; +apheleia.el ends here