-
Notifications
You must be signed in to change notification settings - Fork 121
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
Jump Custom Request #1374
base: master
Are you sure you want to change the base?
Jump Custom Request #1374
Conversation
Pull Request Test Coverage Report for Build 4578Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
We should think about what we want to do with the jump code action. The two obvious possibilities are:
I am personally in favor of 2, since the nice trick allows direct support in any editor with the required capabilities. |
I am also in favor of 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes looks ok to me. It's one more custom request as discussed with @awilliambauer , but hopefully we will be able to work on client implementations soon.
related to #1360
This PR contains an implementation for a custom requests based on Merlin's jump command.
Using code actions introduces some noise as referenced in this comment: #1364 (comment)
An alternative solution will be to use a custom request, which allows for more better finetuning.
Merlin Jump Request
Description
This custom request allows Merlin-type code navigation in a source buffer.
Server capability
handleMerlinJump
boolean
Request
ocamllsp/merlinJump
TextDocumentIdentifier
: Specifies the document for which the request is sent. It includes a uri property that points to the document.Position
: Specifies the position in the document for which the documentation is requested. It includes line and character properties.More details can be found in the TextDocumentPositionParams - LSP Specification.
Target
: A string representing the identifier within the document to search for and jump to.The target can be any of
fun
,let
,module
,module-type
,match
,match-next-case
,match-prev-case
.Response
Position
: The position to jump toTextDocumentIdentifier
: the document path which contains this position (ideally the same document as the request)cc @voodoos @xvw @rgrinberg @awilliambauer