summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-23 04:15:54 +0100
committerjao <jao@gnu.org>2021-10-23 04:15:54 +0100
commit3d96855db7e3c62370029dcaa7af33512318d06a (patch)
treed404ce9a5ccd2a1587ab5ac89e6a8ecd84ae0963
parent3b154d688a088cd3e74c2ff12891be4a58cd567f (diff)
downloadelibs-3d96855db7e3c62370029dcaa7af33512318d06a.tar.gz
elibs-3d96855db7e3c62370029dcaa7af33512318d06a.tar.bz2
avy and link-hint
-rw-r--r--completion.org38
1 files changed, 37 insertions, 1 deletions
diff --git a/completion.org b/completion.org
index d8ba4b4..99524fd 100644
--- a/completion.org
+++ b/completion.org
@@ -107,7 +107,7 @@
("C-c I" . consult-project-imenu)
("C-c k" . consult-ripgrep)
("C-c K" . consult-git-grep)
- ("C-c l" . consult-locate)
+ ;; ("C-c l" . consult-locate)
("C-c m" . consult-mode-command)
("C-c s" . consult-line)
("C-x r x" . consult-register)
@@ -441,6 +441,42 @@
(add-to-list 'embark-keymap-alist
'(spotify-search-item . spotify-item-keymap)))
#+end_src
+* avy link hints
+ [[https://karthinks.com/software/avy-can-do-anything/][Avy can do anything | Karthinks]]
+ #+begin_src emacs-lisp
+
+ (use-package avy
+ :ensure t
+ :init (setq avy-style 'pre
+ avy-background t
+ avy-single-candidate-jump t)
+
+ :config
+
+ (defun avy-embark-act (pt)
+ "Use Embark to act on the completion at PT."
+ (save-excursion
+ (goto-char pt)
+ (embark-act)))
+ (add-to-list 'avy-dispatch-alist '(?\; . avy-embark-act))
+
+ :bind ("C-c a" . avy-goto-char-timer))
+
+ (use-package link-hint
+ :ensure t
+ :init (setq link-hint-avy-style 'pre)
+
+ :config
+
+ (defun embark-on-link ()
+ (interactive)
+ (let ((unread-command-events '(?\;)))
+ (link-hint-open-link)))
+
+ :bind (("C-c L" . link-hint-open-link)
+ ("C-c l" . embark-on-link)))
+
+ #+end_src
* imenu
#+begin_src emacs-lisp
(use-package imenu