Skip to content

Instantly share code, notes, and snippets.

@jclosure
Last active September 14, 2020 23:44
Show Gist options
  • Save jclosure/25be4bc2fb8ba0460e2470dfe6f3d147 to your computer and use it in GitHub Desktop.
Save jclosure/25be4bc2fb8ba0460e2470dfe6f3d147 to your computer and use it in GitHub Desktop.
Use dumb-jump as a fallback for xref

I use dumb-jump, though I was unaware of the new changes as I probably use an older version. Skimming the docs it encourages you to enable M-x dumb-jump-mode but the keymap does not actually enable the xref bindings. The code says you must add dumb-jump-xref-activate to xref-backend-functions.

Try this:

(add-to-list 'xref-backend-functions 'dumb-jump-xref-activate t)

And then xref will fall back to dumb-jump when there are no better options. Edit: you may want to try with and without t as it appends, meaning dumb-jump is the last possible choice. It's possible the crappy TAGS plugin insists it can fulfill the request.

ref: https://www.reddit.com/r/emacs/comments/hzxvke/how_do_people_have_dumbjump_setup/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment