This commit is contained in:
Case Duckworth 2021-05-27 17:37:32 -05:00
commit cf0b0ffe43
2 changed files with 25 additions and 34 deletions

49
init.el
View File

@ -32,17 +32,7 @@
(let ((recipe (cadr sexp)))
(if (consp recipe)
(car recipe)
recipe))))
(setup-define :leader
(lambda (key command)
`(progn
(autoload #',command (symbol-name setup-name))
(define-key acdw/leader
,(if (stringp key) (kbd key) key)
#',command)))
:documentation "Bind KEY to COMMAND in `acdw/leader' (C-z) map."
:repeatable t))
recipe)))))
;;;; `no-littering'
(setup (:straight no-littering)
@ -142,7 +132,7 @@
(setup debugger
(:hook visual-line-mode)
(:leader "d" toggle-debug-on-error))
(:global "C-c d" toggle-debug-on-error))
(setup dired
(setq-default dired-recursive-copies 'always
@ -323,9 +313,10 @@
(interactive)
(if (eq (current-buffer) (get-buffer (or buffer-name "*eshell*")))
(eshell-life-is-too-much)
(eshell)))
(with-message "Starting eshell"
(eshell))))
(:leader "s" eshell-pop-or-quit)
(:global "C-c s" eshell-pop-or-quit)
(add-hook 'eshell-mode-hook
(defun eshell-mode@setup ()
@ -405,14 +396,16 @@
(:option gnus-home-directory (acdw/dir "gnus" t)
gnus-directory (acdw/dir "News" t)
gnus-init-file (expand-file-name "gnus.el" user-emacs-directory))
(:leader "m" gnus))
(:global "C-c m" gnus))
(setup ibuffer
(:option ibuffer-saved-filter-groups
'(("default"
("dired" (mode . dired-mode))
("customize" (mode . Custom-mode))
("emacs" (or (name . "^\\*scratch\\*$")
(name . "^\\*Messages\\*$")
(name . "^\\*Warnings\\*$")
(name . "^\\*straight-process\\*$")
(name . "^\\*Calendar\\*$")))
("git" (or (name . "^\*magit")
@ -739,8 +732,8 @@
;; Remap C-h to DEL -- <f1> can be the "help" key
(define-key key-translation-map [?\C-h] [?\C-?])
(:leader "C-c" save-buffers-kill-emacs
"t" acdw/insert-iso-date))
(:global "C-c t" acdw/insert-iso-date
"C-z" nil))
;;; Packages
@ -810,10 +803,11 @@ if ripgrep is installed, otherwise `consult-grep'."
;; Bindings
(:global
;; C-c bindings (`mode-specific-map')
"C-c h" consult-history
"C-c m" consult-mode-command
"C-c b" consult-bookmark
"C-c k" consult-kmacro
;; I don't use any of these right now.
;; "C-c h" consult-history
;; "C-c m" consult-mode-command
;; "C-c b" consult-bookmark
;; "C-c k" consult-kmacro
;; C-x bindings (`ctl-x-map')
"C-x M-:" consult-complex-command
"C-x b" consult-buffer
@ -887,8 +881,6 @@ if ripgrep is installed, otherwise `consult-grep'."
elpher-certificate-directory (acdw/dir "elpher/")
elpher-gemini-max-fill-width fill-column)
(:leader "e" elpher-bookmarks)
(:bind "n" elpher-next-link
"p" elpher-prev-link
"o" elpher-follow-current-link
@ -953,7 +945,7 @@ if ripgrep is installed, otherwise `consult-grep'."
(:file-match "\\.lua\\'"))
(setup (:straight magit)
(:leader "g" magit-status)
(:global "C-c g" magit-status)
(defun magit-display-buffer-same-window (buffer)
"Display BUFFER in the selected window like God intended."
@ -1156,6 +1148,15 @@ if ripgrep is installed, otherwise `consult-grep'."
(add-to-list 'comp-deferred-compilation-deny-list "vertico"))
(vertico-mode +1))
(setup (:straight vuiet)
(:needs "youtube-dl"
"mpv")
;; lastfm.el is required too, and needs some setup:
;; https://github.com/mihaiolteanu/lastfm.el
(setup (:straight lastfm)
(require 'lastfm)))
(setup (:straight web-mode)
(:option css-level-offset 2
js-indent-level 2

View File

@ -475,16 +475,6 @@ Then, build `browse-url-button-regexp' with the new protocol."
(setq-default browse-url-button-regexp (acdw/build-button-url-regexp)))
;;; Keymaps
(defvar acdw/leader
(let ((map (make-sparse-keymap))
(c-z (global-key-binding "\C-z")))
(global-set-key "\C-z" map)
(define-key map "\C-z" c-z)
map))
;;; Minor modes