about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-navigation.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el
index 45ad209..a722aac 100644
--- a/.emacs.d/lisp/init-navigation.el
+++ b/.emacs.d/lisp/init-navigation.el
@@ -63,6 +63,21 @@ char."
   ("C-@" . goto-char-forward-repeat-last)
   ("C-:" . goto-char-backward-repeat-last))
 
+(use-package avy
+  :config
+  ;; https://karthinks.com/software/avy-can-do-anything/#avy-plus-embark-any-action-anywhere
+  (defun avy-action-embark (pt)
+    (unwind-protect
+        (save-excursion
+          (goto-char pt)
+          (embark-act))
+      (select-window
+       (cdr (ring-ref avy-ring 0))))
+    t)
+  (add-to-list 'avy-dispatch-alist '(111 . avy-action-embark))
+  :bind
+  ("M-`" . avy-goto-char-timer))
+
 (use-package smartscan
   :config
   (global-smartscan-mode t)