From 2960fc5ad1c36df3878e4c1bb67876e7d52d6d9b Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Thu, 6 Jun 2024 11:49:48 -0400 Subject: [PATCH] Set up Avy --- emacs/.emacs.d/config/init-editing.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/emacs/.emacs.d/config/init-editing.el b/emacs/.emacs.d/config/init-editing.el index ee2c60b..ddffe6e 100644 --- a/emacs/.emacs.d/config/init-editing.el +++ b/emacs/.emacs.d/config/init-editing.el @@ -7,6 +7,24 @@ :config (ctrlf-mode 1)) +(use-package avy + :config + (with-eval-after-load 'embark + (defun avy-action-embark (point) + (unwind-protect + (save-excursion + (goto-char point) + (embark-act)) + (select-window + (cdr (ring-ref avy-ring 0)))) + t) + (setf (alist-get ?. avy-dispatch-alist) + #'avy-action-embark) + (add-to-list 'avy-dispatch-alist '(?\C-. . avy-action-embark))) + :bind + ("M-f" . avy-goto-char-timer)) + + ;; "pair" management, where pairs are parentheses, braces, etc. (use-package smartparens :init