diff --git a/thoom-emacs/modules/thoom-editing.el b/thoom-emacs/modules/thoom-editing.el index dcca566..7830b91 100644 --- a/thoom-emacs/modules/thoom-editing.el +++ b/thoom-emacs/modules/thoom-editing.el @@ -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