Embark actually works (gnome key binding issue)

This commit is contained in:
MitchMarq42 2022-07-22 16:24:12 -08:00
parent 872da20bc5
commit 713ff50d07

View File

@ -191,25 +191,29 @@ be built with `xwidget' support."
;; weird multi-path thing
(use-package embark
:general
(general-define-key
:keymap minibuffer-mode-map
"C-." 'embark-act
"C-;" 'embark-dwim)
: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)
(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"
(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)
(_ (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