about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-09-16 06:53:27 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-09-16 06:53:27 +0100
commitbfdd9a6d594efe37d50585b79b2c79365163af69 (patch)
tree6fab0f36e0dbcd84d348bf861853c9ce01d07090 /.emacs.d/lisp
parent0fc0a198af419049769cb0c39c387257188ccec4 (diff)
downloaddotfiles-bfdd9a6d594efe37d50585b79b2c79365163af69.tar.gz
Add gumshoe
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-navigation.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el
index 7d65a94..3e6804e 100644
--- a/.emacs.d/lisp/init-navigation.el
+++ b/.emacs.d/lisp/init-navigation.el
@@ -127,5 +127,28 @@ char."
   ("C-c C-M-r" . rg-menu)
   ("C-c C-M-R" . rg))
 
+(use-package gumshoe
+  :defer 5
+  :after perspective
+  :diminish global-gumshoe-persp-mode
+  :custom (gumshoe-show-footprints-p nil)
+  :config
+  (global-gumshoe-persp-mode +1)
+  (defvar gumshoe-repeat-map
+    (let ((map (make-sparse-keymap)))
+      (define-key map (kbd "]") #'gumshoe-buf-backtrack-forward)
+      (define-key map (kbd "[") #'gumshoe-buf-backtrack-back)
+      (define-key map (kbd "}") #'gumshoe-persp-backtrack-forward)
+      (define-key map (kbd "{") #'gumshoe-persp-backtrack-back)
+      map))
+  (dolist (cmd '(gumshoe-buf-backtrack-forward gumshoe-buf-backtrack-back gumshoe-persp-backtrack-forward gumshoe-persp-backtrack-back))
+    (put cmd 'repeat-map 'gumshoe-repeat-map))
+  :bind
+  ("C-c ]" . gumshoe-buf-backtrack-forward)
+  ("C-c [" . gumshoe-buf-backtrack-back)
+  ("C-c }" . gumshoe-persp-backtrack-forward)
+  ("C-c {" . gumshoe-persp-backtrack-back)
+  ("C-c '" . gumshoe-peruse-in-persp))
+
 (provide 'init-navigation)
 ;;; init-navigation.el ends here