diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/init.el b/init.el index a21e35d..a064bda 100644 --- a/init.el +++ b/init.el | |||
@@ -49,12 +49,6 @@ | |||
49 | :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map." | 49 | :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map." |
50 | :repeatable t) | 50 | :repeatable t) |
51 | 51 | ||
52 | (setup-define :mode | ||
53 | (lambda (ext) | ||
54 | `(add-to-list 'auto-mode-alist (cons ,ext setup-mode))) | ||
55 | :documentation "Add SETUP-MODE to `auto-mode-alist' for EXTENSION." | ||
56 | :repeatable t) | ||
57 | |||
58 | ;;; `no-littering' | 52 | ;;; `no-littering' |
59 | (setup (:straight no-littering) | 53 | (setup (:straight no-littering) |
60 | (:option no-littering-etc-directory (acdw/dir) | 54 | (:option no-littering-etc-directory (acdw/dir) |
@@ -179,7 +173,7 @@ | |||
179 | completion-category-defaults nil | 173 | completion-category-defaults nil |
180 | completion-category-overrides | 174 | completion-category-overrides |
181 | '((file (styles . (partial-completion))))) | 175 | '((file (styles . (partial-completion))))) |
182 | (icomplete-mode +1) | 176 | ;; (icomplete-mode +1) |
183 | 177 | ||
184 | ;; Emoji | 178 | ;; Emoji |
185 | (let ((ffl (font-family-list))) | 179 | (let ((ffl (font-family-list))) |
@@ -257,7 +251,8 @@ | |||
257 | "C-c i" acdw/find-emacs-dotfiles | 251 | "C-c i" acdw/find-emacs-dotfiles |
258 | "C-x k" acdw/kill-a-buffer) | 252 | "C-x k" acdw/kill-a-buffer) |
259 | 253 | ||
260 | (:leader "C-c" save-buffers-kill-emacs) | 254 | (:leader "C-c" save-buffers-kill-emacs |
255 | "t" acdw/insert-iso-date) | ||
261 | 256 | ||
262 | ;;; Advice | 257 | ;;; Advice |
263 | ;; `acdw/kill-line-and-join-advice' cribs from `crux-kill-and-join-forward'. | 258 | ;; `acdw/kill-line-and-join-advice' cribs from `crux-kill-and-join-forward'. |
@@ -478,6 +473,7 @@ | |||
478 | (:option elpher-ipv4-always t | 473 | (:option elpher-ipv4-always t |
479 | elpher-certificate-directory (acdw/dir "elpher/") | 474 | elpher-certificate-directory (acdw/dir "elpher/") |
480 | elpher-gemini-max-fill-width fill-column) | 475 | elpher-gemini-max-fill-width fill-column) |
476 | (:leader "e" elpher-bookmarks) | ||
481 | (:bind "n" elpher-next-link | 477 | (:bind "n" elpher-next-link |
482 | "p" elpher-prev-link | 478 | "p" elpher-prev-link |
483 | "o" elpher-follow-current-link | 479 | "o" elpher-follow-current-link |
@@ -497,7 +493,16 @@ | |||
497 | (setup (:straight (gemini-mode | 493 | (setup (:straight (gemini-mode |
498 | :host nil | 494 | :host nil |
499 | :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) | 495 | :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) |
500 | (:mode "\\.\\(gemini\\|gmi\\)\\'")) | 496 | (:file-match "\\.\\(gemini\\|gmi\\)\\'")) |
497 | |||
498 | (setup (:straight (gemini-write | ||
499 | :host nil | ||
500 | :repo "https://alexschroeder.ch/cgit/gemini-write" | ||
501 | :fork | ||
502 | (:repo "https://tildegit.org/acdw/gemini-write" | ||
503 | :branch "main"))) | ||
504 | (with-eval-after-load 'elpher | ||
505 | (require 'gemini-write))) | ||
501 | 506 | ||
502 | (setup dired | 507 | (setup dired |
503 | (setq-default dired-recursive-copies 'always | 508 | (setq-default dired-recursive-copies 'always |
@@ -551,7 +556,7 @@ | |||
551 | 556 | ||
552 | (setup (:straight nov) | 557 | (setup (:straight nov) |
553 | (:option nov-text-width fill-column) | 558 | (:option nov-text-width fill-column) |
554 | (:mode "\\.epub\\'")) | 559 | (:file-match "\\.epub\\'")) |
555 | 560 | ||
556 | (setup gnus | 561 | (setup gnus |
557 | (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) | 562 | (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) |
@@ -845,6 +850,8 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
845 | 850 | ||
846 | (setup (:straight paredit) | 851 | (setup (:straight paredit) |
847 | 852 | ||
853 | ;; I don't use paredit-splice-sexp much, and it stomps on isearch. | ||
854 | (:unbind "M-s") | ||
848 | (defun setup-paredit-mode () | 855 | (defun setup-paredit-mode () |
849 | "Correct weirdnesses and set up paredit mode." | 856 | "Correct weirdnesses and set up paredit mode." |
850 | (paredit-mode +1) | 857 | (paredit-mode +1) |
@@ -914,10 +921,10 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
914 | (when (executable-find "fennel") | 921 | (when (executable-find "fennel") |
915 | (setup (:straight fennel-mode) | 922 | (setup (:straight fennel-mode) |
916 | (autoload 'fennel-repl "fennel-mode" nil t) | 923 | (autoload 'fennel-repl "fennel-mode" nil t) |
917 | (:mode "\\.fnl\\'"))) | 924 | (:file-match "\\.fnl\\'"))) |
918 | 925 | ||
919 | (setup (:straight lua-mode) | 926 | (setup (:straight lua-mode) |
920 | (:mode "\\.lua\\'")) | 927 | (:file-match "\\.lua\\'")) |
921 | 928 | ||
922 | (setup sh-mode | 929 | (setup sh-mode |
923 | (:option sh-basic-offset tab-width | 930 | (:option sh-basic-offset tab-width |
@@ -940,13 +947,13 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
940 | (:option css-level-offset 2 | 947 | (:option css-level-offset 2 |
941 | js-indent-level 2 | 948 | js-indent-level 2 |
942 | sgml-indent-offset 2) | 949 | sgml-indent-offset 2) |
943 | (:mode "\\.\\(p\\|dj\\)?html\\'" | 950 | (:file-match "\\.\\(p\\|dj\\)?html\\'" |
944 | "\\.html?\\'" | 951 | "\\.html?\\'" |
945 | "\\.\\(tpl\\.\\)?php\\'" | 952 | "\\.\\(tpl\\.\\)?php\\'" |
946 | "\\.[agj]sp\\'" | 953 | "\\.[agj]sp\\'" |
947 | "\\.as[cp]x\\'" | 954 | "\\.as[cp]x\\'" |
948 | "\\.erb\\'" | 955 | "\\.erb\\'" |
949 | "\\.mustache\\'")) | 956 | "\\.mustache\\'")) |
950 | 957 | ||
951 | (when (locate-library "gforth") | 958 | (when (locate-library "gforth") |
952 | (autoload 'forth-mode "gforth") | 959 | (autoload 'forth-mode "gforth") |
@@ -956,3 +963,10 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
956 | 963 | ||
957 | (when (eq acdw/system :home) | 964 | (when (eq acdw/system :home) |
958 | (setup (:straight pkgbuild-mode))) | 965 | (setup (:straight pkgbuild-mode))) |
966 | |||
967 | |||
968 | ;;; Server | ||
969 | |||
970 | (require 'server) | ||
971 | (unless (server-running-p) | ||
972 | (server-start)) | ||