selectrum: reorganize keybinding locations

- bind to `minibuffer-local-map` instead of `selectrum-minibuffer-map`
  when possible.
- move bindings and remaps to be under their relevant `use-package!`
  statements.
This commit is contained in:
Itai Y. Efrat 2021-05-29 16:02:02 +03:00
parent 4359d96c4c
commit 8c75e07497

View file

@ -8,9 +8,6 @@
selectrum-extend-current-candidate-highlight t)
(when (featurep! +prescient)
(setq completion-styles '(substring partial-completion)))
(map! "C-;" #'embark-act ; to be moved to :config default if accepted
:leader
:desc "Actions" "a" #'embark-act) ; to be moved to :config default if accepted
:config
(setq selectrum-fix-vertical-window-height 17
selectrum-max-window-height 17)
@ -32,13 +29,7 @@
(call-interactively 'backward-delete-char)))
(map! :map selectrum-minibuffer-map
"C-;" #'embark-act
"C-c C-;" #'embark-export
:desc "Export to writable buffer"
"C-c C-e" #'+selectrum/embark-export-write
[backspace] #'+selectrum/backward-updir
:desc "Cycle marginalia views"
"M-A" #'marginalia-cycle))
[backspace] #'+selectrum/backward-updir))
(use-package! selectrum-prescient
:when (featurep! +prescient)
@ -97,7 +88,6 @@
[remap switch-to-buffer-other-window] #'consult-buffer-other-window
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
[remap yank-pop] #'consult-yank-pop
[remap describe-bindings] #'embark-bindings
[remap persp-switch-to-buffer] #'+selectrum/switch-workspace-buffer)
(setq completion-in-region-function #'consult-completion-in-region)
:config
@ -129,6 +119,16 @@
(which-key--show-keymap "Embark" map nil nil 'no-paging)
#'which-key--hide-popup-ignore-command)
embark-become-indicator embark-action-indicator)
(map! "C-;" #'embark-act ; to be moved to :config default if accepted
:leader
:desc "Actions" "a" #'embark-act) ; to be moved to :config default if accepted
(map! :map minibuffer-local-map
"C-;" #'embark-act
"C-c C-;" #'embark-export
:desc "Export to writable buffer"
"C-c C-e" #'+selectrum/embark-export-write)
(define-key!
[remap describe-bindings] #'embark-bindings)
:config
(map!
:map embark-file-map
@ -140,6 +140,10 @@
(use-package! marginalia
:hook (doom-first-input . marginalia-mode)
:init
(map! :map minibuffer-local-map
:desc "Cycle marginalia views"
"M-A" #'marginalia-cycle)
:config
(add-to-list 'marginalia-command-categories '(persp-switch-to-buffer . buffer)))