Open zenspider opened 7 months ago
I've got the same issue as well. If I add (setq dumb-jump-force-searcher 'rg)
in my config everything works.
Same here, it just don't work at all unless set force searcher, tested on python and golang.
Duplicate of #428
I don't consider this a duplicate. Part of the problem, not addressed in the other issue, is ignoring my preference and choosing git grep over my settings.
Since this project doesn't seem to be maintained these days, I'm experimenting with a fork I'm making called dumber-jump
. Only uses rg and completing-read and removes the long obsoleted functions. Much less to configure.
I've got the same issue as well. If I add
(setq dumb-jump-force-searcher 'rg)
in my config everything works.
This is the solution if git grep
doesn’t work for you. I am really confused why this one line of config is such a big deal.
The reason preferred (more like fallback) doesn’t work is because git grep
is actually available and at some point git grep was considered the optimal searcher, but unfortunately git
has borked its grep implementation in recent versions. It’s complicated by the fact that there are/were a very wide assortment of git
versions in the wild, so I am hesitant to change that default.
This should actually default to just grep
since that’s widely installed in a “just works” sense.
No great solution in my mind. If someone wants to make a fork then that’s certainly fine with me.
@zenspider , I must admit I don't understand the problem either. The code has the dumb-jump-force-searcher
user-option. It can be customized and takes over. What does "it ignores my preference" mean?
There's a 2 year old bug open on this project explaining how git grep hasn't worked for some time... so I don't feel terribly motivated to explain how the preferences are broken.
The short version:
"The preferred searcher to use 'ag, 'rg, 'git-grep, 'gnu-grep,or 'grep.
If nil then the most optimal searcher will be chosen at runtime."
there shouldn't be 2 settings for what searcher you prefer. nil
says "Best Available"
, and everything else should be respected. Period. To have a second variable that means "no really, I want this one"? Bad design. Don't get me started.
Nevermind the fact that git grep
isn't the best and has consistently been the worst for multiple years now AND has been on your radar as broken this whole time.
from the readme:
This means minimal -- and ideally zero -- configuration
So much for that.
Since it seems obvious to me that the maintainer has no intention of addressing these deficiencies, I'm going to focus on cleaning up my fork and getting it published. @jacktasia feel free to close this issue as you see fit.
Took me long enough, but I have published zenspider/dumber-jump, now on melpa. It has sensible defaults that have allowed me to get rid of all my dumb-jump customization that I needed to work.
Without any config, if any project I use that is backed by git, then dumb-jump prefers to use
git grep
to find definitions viadumb-jump-pick-grep-variant
. The problem, in C or ruby or anything else I've tried, is that it doesn't find ANYTHING... 0% hit rate. If I set'(dumb-jump-force-searcher 'rg)
then everything works well. I don't know ifgit grep
regexps are deficient or broken because I find dumb-jump hard to navigate but the problem certainly lies with the searcher. For some reason I can't figure out, it choosesgit-grep
overdumb-jump-prefer-searcher
, so I'm not sure what theprefer
vsforce
distinction is for.I would also suggest that rg be preferred over ag.