Add embark action for avy

This commit is contained in:
2024-09-16 18:57:58 -07:00
parent 0840187a4f
commit 4c7b87af5f

View File

@@ -34,6 +34,17 @@
("C-j" . nil))
:init
(defun avy-action-embark (pt)
(unwind-protect
(save-excursion
(goto-char pt)
(embark-act))
(select-window
(cdr (ring-ref avy-ring 0))))
t)
(setf (alist-get ?\; avy-dispatch-alist) 'avy-action-embark)
(setq avy-timeout-seconds 0.25)
;; Always show candidates even when there's just one, to give an
;; opportunity to select an avy action