summary refs log tree commit diff stats
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2017-03-20 15:10:43 +0100
committerAlan Pearce2017-03-20 15:10:43 +0100
commit3936dc527affdf9dfc6a3089f5e8c2dd57385a65 (patch)
tree1f62a4ad78cffc8c2246275047bd0fcb1e5ae522 /emacs/.emacs.d
parent05f574baa9e43499a13460bdfbb5140fcf957d6d (diff)
downloadnixfiles-3936dc527affdf9dfc6a3089f5e8c2dd57385a65.tar.lz
nixfiles-3936dc527affdf9dfc6a3089f5e8c2dd57385a65.tar.zst
nixfiles-3936dc527affdf9dfc6a3089f5e8c2dd57385a65.zip
Emacs: Install dumb-jump for simple goto-definition
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/init.org15
1 files changed, 15 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 369da204..880e4bc6 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1748,6 +1748,21 @@ A nice completion backend for programming modes.
           (add-hook 'c-mode-common-hook #'turn-on-ggtags-mode)))
 #+END_SRC
 
+** dumb-jump
+
+A "clever" way of implementing go-to-definition across languages: use
+a project-wide text search and apply heuristics to the results to
+guess a definition.
+
+#+BEGIN_SRC emacs-lisp
+(use-package dumb-jump
+  :bind (("M-g o" . dumb-jump-go-other-window)
+         ("M-g j" . dumb-jump-go)
+         ("M-g x" . dumb-jump-go-prefer-external)
+         ("M-g z" . dumb-jump-go-prefer-external-other-window))
+  :config (setq dumb-jump-selector 'ivy))
+#+END_SRC
+
 ** Lisps
 
 *** All