From c7a9cba8247444ab08a9f3266404bb2156924cf0 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 6 Dec 2021 19:58:46 -0600 Subject: Mostley add +key.el (but of course other stuff) --- init.el | 71 ++++++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 23 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 60707af..e0cf8ae 100644 --- a/init.el +++ b/init.el @@ -38,6 +38,9 @@ (save-buffer))) (:hook '+init-add-setup-to-imenu)) +(setup (:require +key) + (+key-global-mode +1)) + (setup (:require auth-source) (:option auth-sources (list (private/ "authinfo") (private/ "authinfo.gpg") @@ -82,7 +85,7 @@ (:hook 'dired-collapse-mode 'dired-hide-details-mode 'hl-line-mode) - (:global "C-x C-j" 'dired-jump) + (:+key "C-x C-j" 'dired-jump) (with-eval-after-load 'dired (pcase system-type ((or 'ms-dos 'windows-nt) @@ -164,7 +167,7 @@ (setup (:straight anzu) (:option anzu-cons-mode-line-p nil) - (:global [remap query-replace] 'anzu-query-replace-regexp + (:+key [remap query-replace] 'anzu-query-replace-regexp [remap query-replace-regexp] 'anzu-query-replace-regexp) (global-anzu-mode +1) (:bind-into isearch @@ -175,7 +178,7 @@ (setup (:straight avy) (:also-load +avy) - (:global "M-j" 'avy-goto-char-timer) + (:+key "M-j" 'avy-goto-char-timer) (:bind-into isearch "M-j" 'avy-isearch) (:when-loaded @@ -366,7 +369,7 @@ (:option consult--regexp-compiler 'consult--orderless-regexp-compiler)))) (setup (:straight crux) - (:global "C-o" 'crux-smart-open-line + (:+key "C-o" 'crux-smart-open-line "M-o" 'crux-other-window-or-switch-buffer "C-x 4 t" 'crux-transpose-windows) @@ -415,7 +418,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight embark) (:option prefix-help-command 'embark-prefix-help-command) - (:global "C-." 'embark-act + (:+key "C-." 'embark-act "M-." 'embark-dwim " B" 'embark-bindings)) @@ -441,12 +444,12 @@ See also `crux-reopen-as-root-mode'." "XDG_CACHE_HOME"))) (setup (:straight expand-region) - (:global "C-=" 'er/expand-region)) + (:+key "C-=" 'er/expand-region)) (setup (:straight (filldent :host github :repo "duckwork/filldent.el")) - (:global "M-q" 'filldent-dwim)) + (:+key "M-q" 'filldent-dwim)) (setup (:straight (frowny :host github @@ -458,7 +461,7 @@ See also `crux-reopen-as-root-mode'." (gcmh-mode +1)) (setup (:straight helpful) - (:global " f" 'helpful-callable + (:+key " f" 'helpful-callable " v" 'helpful-variable " k" 'helpful-key "C-c C-d" 'helpful-at-point)) @@ -466,7 +469,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight (hippie-completing-read :host github :repo "duckwork/hippie-completing-read")) - (:global "M-/" 'hippie-completing-read)) + (:+key "M-/" 'hippie-completing-read)) (setup (:straight hungry-delete) (:option hungry-delete-chars-to-skip " \t" @@ -508,7 +511,7 @@ See also `crux-reopen-as-root-mode'." (isearch-mb-mode +1)) (setup (:straight lacarte) - (:global "" 'lacarte-execute-menu-command)) + (:+key "" 'lacarte-execute-menu-command)) (setup (:straight marginalia) (marginalia-mode +1)) @@ -527,7 +530,7 @@ See also `crux-reopen-as-root-mode'." :repo "protesilaos/modus-themes"))) (setup (:straight mwim) - (:global "C-a" #'mwim-beginning + (:+key "C-a" #'mwim-beginning "C-e" #'mwim-end)) (setup (:straight orderless) @@ -615,6 +618,9 @@ See also `crux-reopen-as-root-mode'." org-appear-delay 0) (:hook-into org-mode)) +(setup (:straight org-sticky-header) + (:hook-into org-mode)) + (setup (:straight paredit) (:bind "DEL" 'paredit-backward-delete "C-" 'paredit-backward-kill-word) @@ -630,13 +636,21 @@ See also `crux-reopen-as-root-mode'." lisp-interaction-mode scheme-mode)) +(setup (:straight scratch) + (:require +scratch) + (:option initial-major-mode 'emacs-lisp-mode + initial-scratch-message + ";; ABANDON ALL HOPE YE WHO ENTER HERE\n") + (add-hook 'kill-buffer-query-functions '+scratch-immortal) + (add-hook 'scratch-create-buffer-hook '+scratch-buffer-setup)) + (setup (:straight (shell-command+ :host nil :repo "https://git.sr.ht/~pkal/shell-command-plus")) (:option shell-command-prompt "$ ") (:bind-into dired "M-!" 'shell-command+) - (:global "M-!" 'shell-command+)) + (:+key "M-!" 'shell-command+)) (setup (:straight (simple-modeline :fork (:repo "duckwork/simple-modeline"))) @@ -657,6 +671,9 @@ See also `crux-reopen-as-root-mode'." +modeline-major-mode))) (simple-modeline-mode +1)) +(setup (:straight smartscan) + (smartscan-mode +1)) + (setup (:straight (sophomore :host github :repo "duckwork/sophomore.el")) @@ -681,11 +698,27 @@ See also `crux-reopen-as-root-mode'." (auto-save-visited-mode -1) (super-save-mode +1)) +(setup (:straight topsy) + (:hook-into prog-mode + circe-chat-mode) + (:when-loaded + (:option + topsy-header-line-format + '(:eval + (list + (propertize " " + 'display + `((space + :align-to + ,(unless (bound-and-true-p visual-fill-column-mode) + 0)))) + (funcall topsy-fn)))))) + (setup (:straight trashed) (:option trashed-action-confirmer #'y-or-n-p)) (setup (:straight undo-fu) - (:global "C-/" #'undo-fu-only-undo + (:+key "C-/" #'undo-fu-only-undo "C-?" #'undo-fu-only-redo)) (setup (:straight undo-fu-session) @@ -697,7 +730,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight (unfill :host github :repo "purcell/unfill" :fork (:host github :repo "duckwork/unfill"))) - (:global "M-q" #'unfill-toggle)) + (:+key "M-q" #'unfill-toggle)) (setup (:straight (vertico :host github @@ -731,16 +764,8 @@ See also `crux-reopen-as-root-mode'." (global-whitespace-cleanup-mode +1)) (setup (:straight zzz-to-char) - (:global "M-z" (lambda (prefix) + (:+key "M-z" (lambda (prefix) "Call `zzz-to-char' or `zzz-up-to-char' with PREFIX arg." (interactive "P") (call-interactively (if prefix #'zzz-up-to-char #'zzz-to-char))))) - -(setup (:straight scratch) - (:also-load +scratch) - (:option initial-major-mode 'emacs-lisp-mode - initial-scratch-message - ";; ABANDON ALL HOPE YE WHO ENTER HERE") - (add-hook 'kill-buffer-query-functions '+scratch-immortal) - (add-hook 'scratch-create-buffer-hook '+scratch-buffer-setup)) -- cgit 1.4.1-21-gabe81