Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Question] How does dump-jump compare to LSP's jump to definition? #317

Closed
ianyepan opened this issue Jan 19, 2020 · 2 comments
Closed

[Question] How does dump-jump compare to LSP's jump to definition? #317

ianyepan opened this issue Jan 19, 2020 · 2 comments

Comments

@ianyepan
Copy link

In terms of speed, these two backends are really similar (I am using git-grep and rg for dumb-jump). But I've noticed that the jumps that LSP gives are usually more accurate, and dumb-jump sometimes gives too many candidates, or jump to an undesired place.
So I was wondering if it's a common practice to use the lsp-mode xref jumps if LSP is available, and then use dumb-jump for languages that LSP doesn't yet support?

@jacktasia
Copy link
Owner

But I've noticed that the jumps that LSP gives are usually more accurate, and dumb-jump sometimes gives too many candidates, or jump to an undesired place.

Yeah, this is basically the "dumb" part of dumb-jump. Since it's just regular expressions under the hood it doesn't actually have much/any understanding of your code, but for the most part just works without setting up and configuring an LSP.

So I was wondering if it's a common practice to use the lsp-mode xref jumps if LSP is available, and then use dumb-jump for languages that LSP doesn't yet support?

I definitely think there are people that do this and https://github.com/jojojames/smart-jump is a similar idea, as far as having a language-specific jumper configured and falling back to dumb-jump. That said, I personally only use dumb-jump so not fully aware of what else people are doing "above it".

@ianyepan
Copy link
Author

@jacktasia I see, thanks for the reply. I guess I can stick to using lsp jumps when available and fall back to dumb-jump for languages without lsp. Nevertheless, this package is awesome and thank you for putting all the work. It's always nice to have different options, and I appreciate dumb-jump's straight-forwardness and simplicity.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants