Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implementation to get list of possible jumps #1891

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

PizieDust
Copy link
Contributor

@PizieDust PizieDust commented Jan 31, 2025

closes #1817

Add a new function get_all that returns all the possible jump targets in a code buffer.
In some client implementations, we repeatedly query the Jump command of Merlin which means many trips to the server from the client. This new function ensures that we only make the trip once and we get all the information we need.

cc @voodoos

Comment on lines +180 to +181
| Some loc -> `Found loc
| None -> `Error ("No matching case found for " ^ target)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that it is not particularly related to this PR but just out of curiosity, why going for a polymorphic variant? It looks like result is sufficient here no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can correct this in a different PR. But I just maintained what was already used, which was the variant

src/analysis/jump.ml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merlin Enhanced Jump Command
2 participants