diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 83 |
1 files changed, 66 insertions, 17 deletions
diff --git a/init.el b/init.el index c398e1d..b281671 100644 --- a/init.el +++ b/init.el | |||
@@ -202,7 +202,7 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
202 | (concat | 202 | (concat |
203 | (acdw-irc/margin-format (plist-get plist :nick) "-" " >" t) | 203 | (acdw-irc/margin-format (plist-get plist :nick) "-" " >" t) |
204 | " " (plist-get plist :body))) | 204 | " " (plist-get plist :body))) |
205 | circe-highlight-nick-type 'sender | 205 | ;; circe-highlight-nick-type 'message |
206 | circe-network-options | 206 | circe-network-options |
207 | `(("Libera Chat" | 207 | `(("Libera Chat" |
208 | :channels ("#emacs" "#systemcrafters" "##webpals") | 208 | :channels ("#emacs" "#systemcrafters" "##webpals") |
@@ -223,10 +223,11 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
223 | circe-reduce-lurker-spam t | 223 | circe-reduce-lurker-spam t |
224 | circe-server-auto-join-default-type :after-auth) | 224 | circe-server-auto-join-default-type :after-auth) |
225 | 225 | ||
226 | (:face circe-nick-highlight-face | 226 | ;; (:face circe-nick-highlight-face |
227 | ((t (:inherit (modus-themes-hl-line))))) | 227 | ;; ((t (:inherit (modus-themes-hl-line))))) |
228 | 228 | ||
229 | (:bind "C-c C-p" #'circe-command-PART) | 229 | (:bind "C-c C-p" #'circe-command-PART |
230 | "C-l" #'lui-track-jump-to-indicator) | ||
230 | 231 | ||
231 | (:advise circe-command-PART :after | 232 | (:advise circe-command-PART :after |
232 | (defun circe-part@kill-buffer (&rest _) | 233 | (defun circe-part@kill-buffer (&rest _) |
@@ -438,9 +439,10 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
438 | (setup debugger | 439 | (setup debugger |
439 | (:hook visual-line-mode)) | 440 | (:hook visual-line-mode)) |
440 | 441 | ||
441 | (setup (:straight (define-repeat-map | 442 | (setup (:straight-if (define-repeat-map |
442 | :host nil | 443 | :host nil |
443 | :repo "https://tildegit.org/acdw/define-repeat-map.el")) | 444 | :repo "https://tildegit.org/acdw/define-repeat-map.el") |
445 | (acdw/system :home)) | ||
444 | 446 | ||
445 | (defun acdw/other-window-or-switch-buffer-backward () | 447 | (defun acdw/other-window-or-switch-buffer-backward () |
446 | (interactive) | 448 | (interactive) |
@@ -725,7 +727,8 @@ AKA, DO NOT USE THIS FUNCTION!!!" | |||
725 | "C-c d" #'acdw/insert-iso-date | 727 | "C-c d" #'acdw/insert-iso-date |
726 | "M-`" nil | 728 | "M-`" nil |
727 | "C-x o" #'acdw/other-window-or-switch-buffer | 729 | "C-x o" #'acdw/other-window-or-switch-buffer |
728 | "C-x O" #'acdw/other-window-or-switch-buffer-backward) | 730 | "C-x O" #'acdw/other-window-or-switch-buffer-backward |
731 | "C-c _" #'add-file-local-variable) | ||
729 | 732 | ||
730 | (:with-map toggle-map | 733 | (:with-map toggle-map |
731 | (:bind "c" #'column-number-mode | 734 | (:bind "c" #'column-number-mode |
@@ -934,7 +937,53 @@ successive invocations." | |||
934 | "C-c l v" #'find-variable)) | 937 | "C-c l v" #'find-variable)) |
935 | 938 | ||
936 | (setup flymake | 939 | (setup flymake |
937 | ;; (:hook-into prog-mode) ; this is very annoying. | 940 | |
941 | (defvar flymake-inhibit-major-modes nil | ||
942 | "Which major-modes NOT to enable `flymake' in.") | ||
943 | |||
944 | (defvar flymake-inhibit-file-name-regexps '("init\\.el\\'" | ||
945 | "early-init\\.el\\'") | ||
946 | "List of file regexps NOT to enable `flymake' in.") | ||
947 | |||
948 | (defvar flymake-inhibit-buffer-name-regexps (list (rx "*scratch*")) | ||
949 | "List of buffer-name regexps NOT to enable `flymake' in.") | ||
950 | |||
951 | (defun list-string-match-p (string regexp-list) | ||
952 | "Return t if at least one regex in RETGEXP-LIST matches STRING, else nil." | ||
953 | (when string ; if STRING is nil, return nil. | ||
954 | (catch 'found | ||
955 | (dolist (regexp regexp-list) | ||
956 | (when (string-match regexp string) | ||
957 | (throw 'found t)))))) | ||
958 | |||
959 | (defun flymake-unless () | ||
960 | "Turn on `flymake-mode', UNLESS it's inhibited. | ||
961 | There are three methods to inhibit flymake in a file. From most | ||
962 | specific to most general, they are these: | ||
963 | |||
964 | - `flymake-inhibit': a file-local-variable | ||
965 | |||
966 | - `flymake-inhibit-buffer-name-regexps': a list of regexps to | ||
967 | match the buffer name against. If one of them matches, inhibit | ||
968 | `flymake-mode'. | ||
969 | |||
970 | - `flymake-inhibit-file-name-regexps': a list of regexps to match | ||
971 | the filename against. If one of them matches, inhibit | ||
972 | `flymake-mode'. | ||
973 | |||
974 | - `flymake-inhibit-major-modes': a list of major-modes in which | ||
975 | to inhibit `flymake-mode'. Really only useful if you want to | ||
976 | generally add `flymake-mode' to `prog-mode-hook'." | ||
977 | (unless (or (bound-and-true-p flymake-inhibit) ; file-local variable | ||
978 | (list-string-match-p (buffer-name) | ||
979 | flymake-inhibit-buffer-name-regexps) | ||
980 | (list-string-match-p (buffer-file-name) | ||
981 | flymake-inhibit-file-name-regexps) | ||
982 | (apply #'derived-mode-p flymake-inhibit-major-modes)) | ||
983 | (flymake-mode-on))) | ||
984 | |||
985 | (add-hook 'prog-mode-hook #'flymake-unless) | ||
986 | |||
938 | (:bind "M-n" #'flymake-goto-next-error | 987 | (:bind "M-n" #'flymake-goto-next-error |
939 | "M-p" #'flymake-goto-prev-error)) | 988 | "M-p" #'flymake-goto-prev-error)) |
940 | 989 | ||
@@ -1132,6 +1181,12 @@ successive invocations." | |||
1132 | (setup (:straight (kaomoji | 1181 | (setup (:straight (kaomoji |
1133 | :host nil | 1182 | :host nil |
1134 | :repo "https://tildegit.org/acdw/kaomoji-insert")) | 1183 | :repo "https://tildegit.org/acdw/kaomoji-insert")) |
1184 | (dolist (km'(("(Ծ‸ Ծ)" "suspicious") | ||
1185 | ("(¬‿¬)═ɜ ɛ═(⌐‿⌐ )" "pound it" "fist bump") | ||
1186 | ("▬▬▬▬▬▬▬▋ Ò╭╮Ó" "hammer") | ||
1187 | ("👁👄👁" "lewk") | ||
1188 | ("( ͡~ ͜ʖ ͡°)" "wink"))) | ||
1189 | (add-to-list 'kaomoji-alist km)) | ||
1135 | (:global "C-x 8 k" #'kaomoji-insert)) | 1190 | (:global "C-x 8 k" #'kaomoji-insert)) |
1136 | 1191 | ||
1137 | (setup (:straight lacarte) | 1192 | (setup (:straight lacarte) |
@@ -1523,14 +1578,7 @@ browser defined in `browse-url-secondary-browser-function'." | |||
1523 | 1578 | ||
1524 | (:hook show-paren-mode | 1579 | (:hook show-paren-mode |
1525 | electric-pair-local-mode | 1580 | electric-pair-local-mode |
1526 | acdw/setup-fringes | 1581 | acdw/setup-fringes |
1527 | |||
1528 | (defun flymake-mode-except () | ||
1529 | "Turn on flymake mode, except in some modes." | ||
1530 | (let ((no-flymake-modes '(emacs-lisp-mode))) | ||
1531 | (unless (or (member major-mode no-flymake-modes) | ||
1532 | (apply #'derived-mode-p no-flymake-modes)) | ||
1533 | (flymake-mode-on)))) | ||
1534 | 1582 | ||
1535 | (defun prog-mode@auto-fill () | 1583 | (defun prog-mode@auto-fill () |
1536 | (setq-local comment-auto-fill-only-comments t) | 1584 | (setq-local comment-auto-fill-only-comments t) |
@@ -1761,6 +1809,7 @@ browser defined in `browse-url-secondary-browser-function'." | |||
1761 | 1809 | ||
1762 | (setup text | 1810 | (setup text |
1763 | (:hook turn-on-auto-fill | 1811 | (:hook turn-on-auto-fill |
1812 | tildify-mode | ||
1764 | acdw/setup-fringes)) | 1813 | acdw/setup-fringes)) |
1765 | 1814 | ||
1766 | (setup (:straight (topsy | 1815 | (setup (:straight (topsy |