add Embark which might do something
This commit is contained in:
parent
5c7f60b56b
commit
111f0fdc65
@ -175,29 +175,61 @@ be built with `xwidget' support."
|
||||
:straight vertico
|
||||
:after vertico
|
||||
:config
|
||||
(vertico-mouse-mode)
|
||||
(add-hook 'minibuffer-setup-hook #'(lambda () pixel-scroll-precision-mode -1)))
|
||||
(vertico-mouse-mode))
|
||||
(use-package consult
|
||||
:after vertico)
|
||||
;; Minibuffer generic stuff
|
||||
(use-package marginalia
|
||||
;; :after ivy
|
||||
:custom (marginalia-separator " ")
|
||||
;; :custom (marginalia-separator " ")
|
||||
:init (marginalia-mode))
|
||||
(use-package orderless
|
||||
;; :after vertico
|
||||
;; :config
|
||||
;; (setq completion-category-defaults nil
|
||||
;; completion-category-overrides nil)
|
||||
;; :commands 'execute-extended-command
|
||||
:custom
|
||||
(completion-styles '(orderless partial-completion basic))
|
||||
(completion-category-defaults nil)
|
||||
;; (completion-category-overrides '((file (styles basic partial-completion))))
|
||||
(completion-category-overrides nil)
|
||||
)
|
||||
(completion-category-overrides nil))
|
||||
|
||||
;; BROKEN: Relative line numbers with stuff
|
||||
;; weird multi-path thing
|
||||
(use-package embark
|
||||
:init
|
||||
;; which-key integration. Verbose and long and maybe broken.
|
||||
;; taken from https://github.com/oantolin/embark/wiki/Additional-Configuration
|
||||
(defun embark-which-key-indicator ()
|
||||
"An embark indicator that displays keymaps using which-key.
|
||||
The which-key help message will show the type and value of the
|
||||
current target followed by an ellipsis if there are further
|
||||
targets."
|
||||
(lambda (&optional keymap targets prefix) (if (null keymap)
|
||||
(which-key--hide-popup-ignore-command)
|
||||
(which-key--show-keymap
|
||||
(if (eq (plist-get (car targets) :type) 'embark-become) "Become"
|
||||
(format "Act on %s '%s'%s" (plist-get (car targets) :type)
|
||||
(embark--truncate-target (plist-get (car targets) :target))
|
||||
(if (cdr targets) "…" "")))
|
||||
(if prefix (pcase (lookup-key keymap prefix 'accept-default)
|
||||
((and (pred keymapp) km) km)
|
||||
(_ (key-binding prefix 'accept-default))) keymap) nil nil t
|
||||
(lambda (binding)
|
||||
(not (string-suffix-p "-argument" (cdr binding))))))))
|
||||
(setq embark-indicators
|
||||
'(embark-which-key-indicator
|
||||
embark-highlight-indicator
|
||||
embark-isearch-highlight-indicator))
|
||||
(defun embark-hide-which-key-indicator (fn &rest args)
|
||||
"Hide the which-key indicator immediately when using the completing-read prompter."
|
||||
(which-key--hide-popup-ignore-command)
|
||||
(let ((embark-indicators
|
||||
(remq #'embark-which-key-indicator embark-indicators)))
|
||||
(apply fn args)))
|
||||
(advice-add #'embark-completing-read-prompter
|
||||
:around #'embark-hide-which-key-indicator)
|
||||
:config
|
||||
(setq enable-recursive-minibuffers t))
|
||||
;; Consult users will also want the embark-consult package.
|
||||
(use-package embark-consult
|
||||
:after (embark consult))
|
||||
|
||||
;; WORKING: Relative line numbers with stuff
|
||||
(use-package linum-relative
|
||||
:diminish
|
||||
:init
|
||||
|
Loading…
Reference in New Issue
Block a user