diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/init.el b/init.el index 967be23..4f71122 100644 --- a/init.el +++ b/init.el | |||
@@ -240,7 +240,11 @@ | |||
240 | ;; Add advice to pulse evaluated regions | 240 | ;; Add advice to pulse evaluated regions |
241 | (define-advice eval-region (:around (fn start end &rest args) pulse-region) | 241 | (define-advice eval-region (:around (fn start end &rest args) pulse-region) |
242 | (pulse-momentary-highlight-region start end) | 242 | (pulse-momentary-highlight-region start end) |
243 | (apply fn start end args))) | 243 | (apply fn start end args)) |
244 | |||
245 | (setup (:straight elisp-slime-nav) | ||
246 | (:hook-into emacs-lisp-mode | ||
247 | ielm-mode))) | ||
244 | 248 | ||
245 | (setup encoding | 249 | (setup encoding |
246 | (:option locale-coding-system 'utf-8-unix | 250 | (:option locale-coding-system 'utf-8-unix |
@@ -417,6 +421,19 @@ like a dumbass." | |||
417 | (defun unfocused@save-buffers () | 421 | (defun unfocused@save-buffers () |
418 | (save-some-buffers t)))) | 422 | (save-some-buffers t)))) |
419 | 423 | ||
424 | (setup flyspell | ||
425 | (add-hook 'text-mode-hook #'flyspell-mode)) | ||
426 | |||
427 | (setup (:straight flyspell-correct) | ||
428 | (add-hook 'flyspell-mode-hook | ||
429 | (defun flyspell-mode@flyspell-correct () | ||
430 | (dolist (keybind '(("C-;" . flyspell-correct-wrapper) | ||
431 | ("C-," . nil) | ||
432 | ("C-." . nil) | ||
433 | ("C-M-i" . nil))) | ||
434 | (define-key flyspell-mode-map | ||
435 | (kbd (car keybind)) (cdr keybind)))))) | ||
436 | |||
420 | ;; (setup flyspell | 437 | ;; (setup flyspell |
421 | ;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae | 438 | ;; ;; follow the directions here: https://old.reddit.com/r/emacs/comments/dgj0ae |
422 | ;; ;; in short: | 439 | ;; ;; in short: |
@@ -790,11 +807,13 @@ like a dumbass." | |||
790 | 807 | ||
791 | (setup variable-pitch-mode | 808 | (setup variable-pitch-mode |
792 | 809 | ||
793 | (defun variable-pitch@disable-fill-column-indicator () | 810 | ;; I might want to change this to `buffer-face-mode-hook'... |
794 | (display-fill-column-indicator-mode -1)) | 811 | (advice-add 'variable-pitch-mode :after |
795 | 812 | (defun variable-pitch-mode@setup (&rest _) | |
796 | (:hook acdw-fonts/adapt-variable-pitch | 813 | "Set up `variable-pitch-mode' with my customizations." |
797 | variable-pitch@disable-fill-column-indicator)) | 814 | (display-fill-column-indicator-mode (if buffer-face-mode |
815 | -1 | ||
816 | +1))))) | ||
798 | 817 | ||
799 | (setup view | 818 | (setup view |
800 | (:option view-read-only t) | 819 | (:option view-read-only t) |
@@ -919,9 +938,9 @@ like a dumbass." | |||
919 | (:global "M-=" count-words | 938 | (:global "M-=" count-words |
920 | "C-w" kill-region-or-backward-word | 939 | "C-w" kill-region-or-backward-word |
921 | "<help> h" nil ; HELLO takes a long time to load on Windows | 940 | "<help> h" nil ; HELLO takes a long time to load on Windows |
922 | "M-c" capitalize-dwim | 941 | "C-c c" capitalize-dwim |
923 | "M-u" upcase-dwim | 942 | "C-c u" upcase-dwim |
924 | "M-l" downcase-dwim) | 943 | "C-c l" downcase-dwim) |
925 | 944 | ||
926 | (:global "C-c t" acdw/insert-iso-date | 945 | (:global "C-c t" acdw/insert-iso-date |
927 | "C-z" nil)) | 946 | "C-z" nil)) |
@@ -955,7 +974,8 @@ like a dumbass." | |||
955 | (dired-async-mode +1)) | 974 | (dired-async-mode +1)) |
956 | 975 | ||
957 | (setup (:straight ace-link) | 976 | (setup (:straight ace-link) |
958 | (ace-link-setup-default)) | 977 | (ace-link-setup-default) |
978 | (define-key erc-mode-map (kbd "C-o") #'ace-link)) | ||
959 | 979 | ||
960 | (setup (:straight avy) | 980 | (setup (:straight avy) |
961 | (:global "C-:" avy-goto-char | 981 | (:global "C-:" avy-goto-char |
@@ -1432,6 +1452,7 @@ successive invocations." | |||
1432 | (require 'acdw-org) ; so I don't clutter up init.el | 1452 | (require 'acdw-org) ; so I don't clutter up init.el |
1433 | (:option | 1453 | (:option |
1434 | org-adapt-indentation nil | 1454 | org-adapt-indentation nil |
1455 | org-agenda-files nil ; only until I set this up | ||
1435 | org-catch-invisible-edits 'smart | 1456 | org-catch-invisible-edits 'smart |
1436 | org-clock-clocked-in-display 'mode-line | 1457 | org-clock-clocked-in-display 'mode-line |
1437 | org-clock-string-limit 7 ; gives time and not title | 1458 | org-clock-string-limit 7 ; gives time and not title |
@@ -1602,6 +1623,11 @@ successive invocations." | |||
1602 | (add-to-list 'auto-mode-alist spec)) | 1623 | (add-to-list 'auto-mode-alist spec)) |
1603 | (add-hook 'ssh-config-mode-hook #'turn-on-font-lock)) | 1624 | (add-hook 'ssh-config-mode-hook #'turn-on-font-lock)) |
1604 | 1625 | ||
1626 | (setup (:straight (topsy | ||
1627 | :host github | ||
1628 | :repo "alphapapa/topsy.el")) | ||
1629 | (:hook-into prog-mode)) | ||
1630 | |||
1605 | (setup (:straight typo) | 1631 | (setup (:straight typo) |
1606 | (add-hook 'text-mode-hook | 1632 | (add-hook 'text-mode-hook |
1607 | (defun text-mode@typo-unless () | 1633 | (defun text-mode@typo-unless () |
@@ -1761,6 +1787,5 @@ call `zzz-to-char'." | |||
1761 | ;;;; Work | 1787 | ;;;; Work |
1762 | (when (acdw/system :work) | 1788 | (when (acdw/system :work) |
1763 | (setup (:straight ahk-mode))) | 1789 | (setup (:straight ahk-mode))) |
1764 | |||
1765 | 1790 | ||
1766 | ;;; init.el ends here | 1791 | ;;; init.el ends here |