Embark actually works (gnome key binding issue)
This commit is contained in:
parent
872da20bc5
commit
713ff50d07
@ -191,25 +191,29 @@ be built with `xwidget' support."
|
|||||||
|
|
||||||
;; weird multi-path thing
|
;; weird multi-path thing
|
||||||
(use-package embark
|
(use-package embark
|
||||||
|
:general
|
||||||
|
(general-define-key
|
||||||
|
:keymap minibuffer-mode-map
|
||||||
|
"C-." 'embark-act
|
||||||
|
"C-;" 'embark-dwim)
|
||||||
:init
|
: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 ()
|
(defun embark-which-key-indicator ()
|
||||||
"An embark indicator that displays keymaps using which-key.
|
"An embark indicator that displays keymaps using which-key.
|
||||||
The which-key help message will show the type and value of the
|
The which-key help message will show the type and value of the
|
||||||
current target followed by an ellipsis if there are further
|
current target followed by an ellipsis if there are further
|
||||||
targets."
|
targets."
|
||||||
(lambda (&optional keymap targets prefix) (if (null keymap)
|
(lambda (&optional keymap targets prefix)
|
||||||
(which-key--hide-popup-ignore-command)
|
(if (null keymap) (which-key--hide-popup-ignore-command)
|
||||||
(which-key--show-keymap
|
(which-key--show-keymap
|
||||||
(if (eq (plist-get (car targets) :type) 'embark-become) "Become"
|
(if (eq (plist-get (car targets) :type) 'embark-become)
|
||||||
|
"Become"
|
||||||
(format "Act on %s '%s'%s" (plist-get (car targets) :type)
|
(format "Act on %s '%s'%s" (plist-get (car targets) :type)
|
||||||
(embark--truncate-target (plist-get (car targets) :target))
|
(embark--truncate-target (plist-get (car targets) :target))
|
||||||
(if (cdr targets) "…" "")))
|
(if (cdr targets) "…" "")))
|
||||||
(if prefix (pcase (lookup-key keymap prefix 'accept-default)
|
(if prefix (pcase (lookup-key keymap prefix 'accept-default)
|
||||||
((and (pred keymapp) km) km)
|
((and (pred keymapp) km) km)
|
||||||
(_ (key-binding prefix 'accept-default))) keymap) nil nil t
|
(_ (key-binding prefix 'accept-default))) keymap)
|
||||||
(lambda (binding)
|
nil nil t (lambda (binding)
|
||||||
(not (string-suffix-p "-argument" (cdr binding))))))))
|
(not (string-suffix-p "-argument" (cdr binding))))))))
|
||||||
(setq embark-indicators
|
(setq embark-indicators
|
||||||
'(embark-which-key-indicator
|
'(embark-which-key-indicator
|
||||||
|
Loading…
Reference in New Issue
Block a user