mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(core): use general.el for keybind definitions nearly everywhere
Primarily this replaces :bind with :general in all use-package calls.
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package anzu
|
||||
:bind
|
||||
("C-x C-r" . anzu-query-replace-regexp)
|
||||
("M-%" . anzu-query-replace)
|
||||
:general
|
||||
("C-x C-r" 'anzu-query-replace-regexp)
|
||||
("M-%" 'anzu-query-replace)
|
||||
|
||||
:custom
|
||||
(anzu-mode-lighter "")
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package avy
|
||||
:bind
|
||||
("C-c j" . avy-goto-word-or-subword-1)
|
||||
("C-c SPC" . avy-goto-char)
|
||||
:general
|
||||
("C-c j" 'avy-goto-word-or-subword-1)
|
||||
("C-c SPC" 'avy-goto-char)
|
||||
|
||||
:custom
|
||||
(avy-background t)
|
||||
(avy-style 'at-full))
|
||||
|
||||
(use-package ace-window
|
||||
:bind
|
||||
("M-o" . ace-window))
|
||||
:general
|
||||
("M-o" 'ace-window))
|
||||
|
||||
(provide 'siren-avy)
|
||||
;;; siren-avy.el ends here
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
(use-package centaur-tabs
|
||||
:commands centaur-tabs-mode
|
||||
|
||||
:bind
|
||||
("s-[" . centaur-tabs-backward-tab)
|
||||
("s-]" . centaur-tabs-forward-tab)
|
||||
("s-<" . centaur-tabs-backward-group)
|
||||
("s->" . centaur-tabs-forward-group)
|
||||
:general
|
||||
("s-[" 'centaur-tabs-backward-tab)
|
||||
("s-]" 'centaur-tabs-forward-tab)
|
||||
("s-<" 'centaur-tabs-backward-group)
|
||||
("s->" 'centaur-tabs-forward-group)
|
||||
|
||||
:custom
|
||||
(centaur-tabs-gray-out-icons 'buffer)
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
(use-package consult
|
||||
:defer t
|
||||
:bind
|
||||
("C-t" . siren-consult-imenu)
|
||||
("C-x b" . consult-buffer)
|
||||
("C-c b" . siren-consult-projectile-buffer)
|
||||
("M-g M-g" . consult-goto-line)
|
||||
:general
|
||||
("C-t" 'siren-consult-imenu)
|
||||
("C-x b" 'consult-buffer)
|
||||
("C-c b" 'siren-consult-projectile-buffer)
|
||||
("M-g M-g" 'consult-goto-line)
|
||||
|
||||
:custom
|
||||
(consult-buffer-sources '(siren-consult--source-buffer-outside-project
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
|
||||
(use-package dired+
|
||||
:defer t
|
||||
:bind (:map dired-mode-map
|
||||
("C-l" . diredp-up-directory-reuse-dir-buffer))
|
||||
:general
|
||||
(:keymaps 'dired-mode-map
|
||||
"C-l" 'diredp-up-directory-reuse-dir-buffer)
|
||||
|
||||
:hook
|
||||
(dired-mode . siren-diredp-mode-setup)
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
(use-package dired
|
||||
:straight (:type built-in)
|
||||
:defer t
|
||||
|
||||
:hook
|
||||
(dired-mode . siren-dired-mode-setup)
|
||||
:bind (:map dired-mode-map
|
||||
("c" . dired-create-directory)
|
||||
("M-?" . siren-dired-display-size))
|
||||
|
||||
:general
|
||||
(:keymaps 'dired-mode-map
|
||||
"c" 'dired-create-directory
|
||||
"M-?" 'siren-dired-display-size)
|
||||
|
||||
:custom
|
||||
(siren-dired-clean-up-dired-buffers-after-deletion nil)
|
||||
@@ -151,13 +154,15 @@ confirmation. To disable the confirmation, see
|
||||
|
||||
(use-package dired-subtree
|
||||
:after dired
|
||||
:bind (:map dired-mode-map
|
||||
("TAB" . dired-subtree-toggle)))
|
||||
:general
|
||||
(:keymaps 'dired-mode-map
|
||||
"TAB" 'dired-subtree-toggle))
|
||||
|
||||
(use-package dired-narrow
|
||||
:after dired
|
||||
:bind (:map dired-mode-map
|
||||
("C-s" . dired-narrow))
|
||||
:general
|
||||
(:keymaps 'dired-mode-map
|
||||
"C-s" 'dired-narrow)
|
||||
|
||||
:custom
|
||||
(dired-narrow-exit-action 'dired-narrow-find-file)
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package direx
|
||||
:bind ("C-x j" . direx-project:jump-to-project-root)
|
||||
:general
|
||||
("C-x j" 'direx-project:jump-to-project-root)
|
||||
:hook
|
||||
(direx-mode . siren-direx-mode-setup)
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package dumb-jump
|
||||
:bind
|
||||
("C-c C-j" . dumb-jump-go)
|
||||
("M-g o" . dumb-jump-go-other-window)
|
||||
("M-g j" . dumb-jump-go)
|
||||
("M-g b" . dumb-jump-back)
|
||||
("M-g i" . dumb-jump-go-prompt)
|
||||
("M-g x" . dumb-jump-go-prefer-external)
|
||||
("M-g z" . dumb-jump-go-prefer-external-other-window))
|
||||
:general
|
||||
("C-c C-j" 'dumb-jump-go)
|
||||
("M-g o" 'dumb-jump-go-other-window)
|
||||
("M-g j" 'dumb-jump-go)
|
||||
("M-g b" 'dumb-jump-back)
|
||||
("M-g i" 'dumb-jump-go-prompt)
|
||||
("M-g x" 'dumb-jump-go-prefer-external)
|
||||
("M-g z" 'dumb-jump-go-prefer-external-other-window))
|
||||
|
||||
(provide 'siren-dumb-jump)
|
||||
;;; siren-dumb-jump.el ends here
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package full-ack
|
||||
:bind
|
||||
("C-c C-a" . ack)
|
||||
:general
|
||||
("C-c C-a" 'ack)
|
||||
|
||||
:custom
|
||||
(ack-arguments '("--sort-files"
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package git-link
|
||||
:bind
|
||||
("C-c g" . git-link)
|
||||
:general
|
||||
("C-c g" 'git-link)
|
||||
|
||||
:custom
|
||||
(git-link-open-in-browser t)
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
|
||||
(use-package helm-ag
|
||||
:after (helm-global-bindings)
|
||||
:bind
|
||||
("C-x '" . helm-do-ag-project-root)
|
||||
("C-x C-'" . helm-do-ag-project-root)
|
||||
(:map helm-command-map
|
||||
("a" . helm-do-ag))
|
||||
|
||||
:general
|
||||
("C-x '" 'helm-do-ag-project-root)
|
||||
("C-x C-'" 'helm-do-ag-project-root)
|
||||
(:keymaps 'helm-command-map
|
||||
"a" 'helm-do-ag)
|
||||
|
||||
:custom
|
||||
(helm-ag-base-command (mapconcat 'identity
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
(use-package helm-open-github
|
||||
:after (helm-global-bindings)
|
||||
:bind
|
||||
("C-c o f" . helm-open-github-from-file)
|
||||
("C-c o c" . helm-open-github-from-commit)
|
||||
("C-c o i" . helm-open-github-from-issues)
|
||||
("C-c o p" . helm-open-github-from-pull-requests)
|
||||
:general
|
||||
("C-c o f" 'helm-open-github-from-file)
|
||||
("C-c o c" 'helm-open-github-from-commit)
|
||||
("C-c o i" 'helm-open-github-from-issues)
|
||||
("C-c o p" 'helm-open-github-from-pull-requests)
|
||||
|
||||
:custom
|
||||
(helm-open-github-commit-limit 10000))
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
(use-package helm-swoop
|
||||
:after (helm-global-bindings)
|
||||
:bind
|
||||
("M-r" . helm-swoop-without-pre-input)
|
||||
("M-R" . helm-swoop-back-to-last-point)
|
||||
("C-c M-r" . helm-multi-swoop)
|
||||
("C-x M-r" . helm-multi-swoop-all))
|
||||
:general
|
||||
("M-r" 'helm-swoop-without-pre-input)
|
||||
("M-R" 'helm-swoop-back-to-last-point)
|
||||
("C-c M-r" 'helm-multi-swoop)
|
||||
("C-x M-r" 'helm-multi-swoop-all))
|
||||
|
||||
(provide 'siren-helm-swoop)
|
||||
;;; siren-helm-swoop.el ends here
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
(use-package helm-global-bindings
|
||||
:straight helm
|
||||
:demand
|
||||
:bind
|
||||
(:map helm-command-map
|
||||
("M" . helm-man-woman))
|
||||
:general
|
||||
(:keymaps 'helm-command-map
|
||||
"M" 'helm-man-woman)
|
||||
|
||||
:custom
|
||||
(helm-command-prefix-key "C-c h"))
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
(imenu-max-items 400))
|
||||
|
||||
(use-package imenu-anywhere
|
||||
:bind
|
||||
("C-c t" . helm-imenu-anywhere))
|
||||
:general
|
||||
("C-c t" 'helm-imenu-anywhere))
|
||||
|
||||
(provide 'siren-imenu)
|
||||
;;; siren-imenu.el ends here
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package recursive-narrow
|
||||
:bind
|
||||
("C-x C-n" . recursive-narrow-or-widen-dwim)
|
||||
("C-x n w" . recursive-widen)
|
||||
("C-x n n" . recursive-narrow-or-widen-dwim)
|
||||
:general
|
||||
("C-x C-n" 'recursive-narrow-or-widen-dwim)
|
||||
("C-x n w" 'recursive-widen)
|
||||
("C-x n n" 'recursive-narrow-or-widen-dwim)
|
||||
|
||||
:config
|
||||
(add-hook 'recursive-narrow-dwim-functions
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
(require 'siren-ivy)
|
||||
|
||||
(use-package swiper
|
||||
:bind
|
||||
("C-s" . swiper)
|
||||
:general
|
||||
("C-s" 'swiper)
|
||||
|
||||
:custom-face
|
||||
(ivy-current-match ((t (:background "#7e9fc9" :foreground "black"))))
|
||||
|
||||
Reference in New Issue
Block a user