mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2026-11-23 06:38:57 +01:00
disable embark
This commit is contained in:
@@ -131,68 +131,68 @@ a remote file anytime and from everywhere I am by just entering :"
|
|||||||
completion-ignore-case t))
|
completion-ignore-case t))
|
||||||
|
|
||||||
|
|
||||||
(use-package embark
|
;; (use-package embark
|
||||||
:ensure t
|
;; :ensure t
|
||||||
|
|
||||||
:bind
|
;; :bind
|
||||||
(("C-." . embark-act) ;; pick some comfortable binding
|
;; (("C-." . embark-act) ;; pick some comfortable binding
|
||||||
("C-," . embark-dwim)) ;; good alternative: M-.
|
;; ("C-," . embark-dwim)) ;; good alternative: M-.
|
||||||
|
|
||||||
|
|
||||||
:init
|
;; :init
|
||||||
;; Optionally replace the key help with a completing-read interface
|
;; ;; Optionally replace the key help with a completing-read interface
|
||||||
(setq prefix-help-command #'embark-prefix-help-command)
|
;; (setq prefix-help-command #'embark-prefix-help-command)
|
||||||
|
|
||||||
;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
|
;; ;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
|
||||||
;; strategy, if you want to see the documentation from multiple providers.
|
;; ;; strategy, if you want to see the documentation from multiple providers.
|
||||||
(add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
|
;; (add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
|
||||||
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
;; ;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
||||||
|
|
||||||
:config
|
;; :config
|
||||||
;; Hide the mode line of the Embark live/completions buffers
|
;; ;; Hide the mode line of the Embark live/completions buffers
|
||||||
(add-to-list 'display-buffer-alist
|
;; (add-to-list 'display-buffer-alist
|
||||||
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
;; '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||||
nil
|
;; nil
|
||||||
(window-parameters (mode-line-format . none))))
|
;; (window-parameters (mode-line-format . none))))
|
||||||
|
|
||||||
|
|
||||||
(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)
|
;; (lambda (&optional keymap targets prefix)
|
||||||
(if (null keymap)
|
;; (if (null keymap)
|
||||||
(which-key--hide-popup-ignore-command)
|
;; (which-key--hide-popup-ignore-command)
|
||||||
(which-key--show-keymap
|
;; (which-key--show-keymap
|
||||||
(if (eq (plist-get (car targets) :type) 'embark-become)
|
;; (if (eq (plist-get (car targets) :type) 'embark-become)
|
||||||
"Become"
|
;; "Become"
|
||||||
(format "Act on %s '%s'%s"
|
;; (format "Act on %s '%s'%s"
|
||||||
(plist-get (car targets) :type)
|
;; (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
|
;; (if prefix
|
||||||
(pcase (lookup-key keymap prefix 'accept-default)
|
;; (pcase (lookup-key keymap prefix 'accept-default)
|
||||||
((and (pred keymapp) km) km)
|
;; ((and (pred keymapp) km) km)
|
||||||
(_ (key-binding prefix 'accept-default)))
|
;; (_ (key-binding prefix 'accept-default)))
|
||||||
keymap)
|
;; keymap)
|
||||||
nil nil t (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
|
||||||
embark-highlight-indicator
|
;; embark-highlight-indicator
|
||||||
embark-isearch-highlight-indicator))
|
;; embark-isearch-highlight-indicator))
|
||||||
|
|
||||||
(defun embark-hide-which-key-indicator (fn &rest args)
|
;; (defun embark-hide-which-key-indicator (fn &rest args)
|
||||||
"Hide the which-key indicator immediately when using the completing-read prompter."
|
;; "Hide the which-key indicator immediately when using the completing-read prompter."
|
||||||
(which-key--hide-popup-ignore-command)
|
;; (which-key--hide-popup-ignore-command)
|
||||||
(let ((embark-indicators
|
;; (let ((embark-indicators
|
||||||
(remq #'embark-which-key-indicator embark-indicators)))
|
;; (remq #'embark-which-key-indicator embark-indicators)))
|
||||||
(apply fn args)))
|
;; (apply fn args)))
|
||||||
|
|
||||||
(advice-add #'embark-completing-read-prompter
|
;; (advice-add #'embark-completing-read-prompter
|
||||||
:around #'embark-hide-which-key-indicator))
|
;; :around #'embark-hide-which-key-indicator))
|
||||||
|
|
||||||
(use-package consult
|
(use-package consult
|
||||||
;; Replace bindings. Lazily loaded due by `use-package'.
|
;; Replace bindings. Lazily loaded due by `use-package'.
|
||||||
|
|||||||
Reference in New Issue
Block a user