about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el49
1 files changed, 25 insertions, 24 deletions
diff --git a/init.el b/init.el index aeb4bcc..7c9d96a 100644 --- a/init.el +++ b/init.el
@@ -32,17 +32,7 @@
32 (let ((recipe (cadr sexp))) 32 (let ((recipe (cadr sexp)))
33 (if (consp recipe) 33 (if (consp recipe)
34 (car recipe) 34 (car recipe)
35 recipe)))) 35 recipe)))))
36
37 (setup-define :leader
38 (lambda (key command)
39 `(progn
40 (autoload #',command (symbol-name setup-name))
41 (define-key acdw/leader
42 ,(if (stringp key) (kbd key) key)
43 #',command)))
44 :documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
45 :repeatable t))
46 36
47;;;; `no-littering' 37;;;; `no-littering'
48(setup (:straight no-littering) 38(setup (:straight no-littering)
@@ -142,7 +132,7 @@
142 132
143(setup debugger 133(setup debugger
144 (:hook visual-line-mode) 134 (:hook visual-line-mode)
145 (:leader "d" toggle-debug-on-error)) 135 (:global "C-c d" toggle-debug-on-error))
146 136
147(setup dired 137(setup dired
148 (setq-default dired-recursive-copies 'always 138 (setq-default dired-recursive-copies 'always
@@ -323,9 +313,10 @@
323 (interactive) 313 (interactive)
324 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*"))) 314 (if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*")))
325 (eshell-life-is-too-much) 315 (eshell-life-is-too-much)
326 (eshell))) 316 (with-message "Starting eshell"
317 (eshell))))
327 318
328 (:leader "s" eshell-pop-or-quit) 319 (:global "C-c s" eshell-pop-or-quit)
329 320
330 (add-hook 'eshell-mode-hook 321 (add-hook 'eshell-mode-hook
331 (defun eshell-mode@setup () 322 (defun eshell-mode@setup ()
@@ -405,14 +396,16 @@
405 (:option gnus-home-directory (acdw/dir "gnus" t) 396 (:option gnus-home-directory (acdw/dir "gnus" t)
406 gnus-directory (acdw/dir "News" t) 397 gnus-directory (acdw/dir "News" t)
407 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) 398 gnus-init-file (expand-file-name "gnus.el" user-emacs-directory))
408 (:leader "m" gnus)) 399 (:global "C-c m" gnus))
409 400
410(setup ibuffer 401(setup ibuffer
411 (:option ibuffer-saved-filter-groups 402 (:option ibuffer-saved-filter-groups
412 '(("default" 403 '(("default"
413 ("dired" (mode . dired-mode)) 404 ("dired" (mode . dired-mode))
405 ("customize" (mode . Custom-mode))
414 ("emacs" (or (name . "^\\*scratch\\*$") 406 ("emacs" (or (name . "^\\*scratch\\*$")
415 (name . "^\\*Messages\\*$") 407 (name . "^\\*Messages\\*$")
408 (name . "^\\*Warnings\\*$")
416 (name . "^\\*straight-process\\*$") 409 (name . "^\\*straight-process\\*$")
417 (name . "^\\*Calendar\\*$"))) 410 (name . "^\\*Calendar\\*$")))
418 ("git" (or (name . "^\*magit") 411 ("git" (or (name . "^\*magit")
@@ -739,8 +732,8 @@
739 ;; Remap C-h to DEL -- <f1> can be the "help" key 732 ;; Remap C-h to DEL -- <f1> can be the "help" key
740 (define-key key-translation-map [?\C-h] [?\C-?]) 733 (define-key key-translation-map [?\C-h] [?\C-?])
741 734
742 (:leader "C-c" save-buffers-kill-emacs 735 (:global "C-c t" acdw/insert-iso-date
743 "t" acdw/insert-iso-date)) 736 "C-z" nil))
744 737
745 738
746;;; Packages 739;;; Packages
@@ -810,10 +803,11 @@ if ripgrep is installed, otherwise `consult-grep'."
810 ;; Bindings 803 ;; Bindings
811 (:global 804 (:global
812 ;; C-c bindings (`mode-specific-map') 805 ;; C-c bindings (`mode-specific-map')
813 "C-c h" consult-history 806 ;; I don't use any of these right now.
814 "C-c m" consult-mode-command 807 ;; "C-c h" consult-history
815 "C-c b" consult-bookmark 808 ;; "C-c m" consult-mode-command
816 "C-c k" consult-kmacro 809 ;; "C-c b" consult-bookmark
810 ;; "C-c k" consult-kmacro
817 ;; C-x bindings (`ctl-x-map') 811 ;; C-x bindings (`ctl-x-map')
818 "C-x M-:" consult-complex-command 812 "C-x M-:" consult-complex-command
819 "C-x b" consult-buffer 813 "C-x b" consult-buffer
@@ -887,8 +881,6 @@ if ripgrep is installed, otherwise `consult-grep'."
887 elpher-certificate-directory (acdw/dir "elpher/") 881 elpher-certificate-directory (acdw/dir "elpher/")
888 elpher-gemini-max-fill-width fill-column) 882 elpher-gemini-max-fill-width fill-column)
889 883
890 (:leader "e" elpher-bookmarks)
891
892 (:bind "n" elpher-next-link 884 (:bind "n" elpher-next-link
893 "p" elpher-prev-link 885 "p" elpher-prev-link
894 "o" elpher-follow-current-link 886 "o" elpher-follow-current-link
@@ -953,7 +945,7 @@ if ripgrep is installed, otherwise `consult-grep'."
953 (:file-match "\\.lua\\'")) 945 (:file-match "\\.lua\\'"))
954 946
955(setup (:straight magit) 947(setup (:straight magit)
956 (:leader "g" magit-status) 948 (:global "C-c g" magit-status)
957 949
958 (defun magit-display-buffer-same-window (buffer) 950 (defun magit-display-buffer-same-window (buffer)
959 "Display BUFFER in the selected window like God intended." 951 "Display BUFFER in the selected window like God intended."
@@ -1156,6 +1148,15 @@ if ripgrep is installed, otherwise `consult-grep'."
1156 (add-to-list 'comp-deferred-compilation-deny-list "vertico")) 1148 (add-to-list 'comp-deferred-compilation-deny-list "vertico"))
1157 (vertico-mode +1)) 1149 (vertico-mode +1))
1158 1150
1151(setup (:straight vuiet)
1152 (:needs "youtube-dl"
1153 "mpv")
1154
1155 ;; lastfm.el is required too, and needs some setup:
1156 ;; https://github.com/mihaiolteanu/lastfm.el
1157 (setup (:straight lastfm)
1158 (require 'lastfm)))
1159
1159(setup (:straight web-mode) 1160(setup (:straight web-mode)
1160 (:option css-level-offset 2 1161 (:option css-level-offset 2
1161 js-indent-level 2 1162 js-indent-level 2