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

Jump to holes ocamllsp typed holes #643

Merged

Conversation

ulugbekna
Copy link
Collaborator

Uses a custom request in ocamllsp to jump around holes. This should allow to eliminate too tight coupling with diagnostics, which caused problems when we want to jump to the first hole in a destructed code.

src/extension_commands.ml Outdated Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
src/custom_requests.ml Outdated Show resolved Hide resolved
src/import.ml Show resolved Hide resolved
src/extension_commands.ml Outdated Show resolved Hide resolved
@ulugbekna ulugbekna force-pushed the jump-to-holes-ocamllsp-typedHoles branch from 041661c to 114d13c Compare June 25, 2021 13:46
src/extension_commands.ml Outdated Show resolved Hide resolved
@ulugbekna
Copy link
Collaborator Author

ulugbekna commented Jun 25, 2021 via email

@tmattio
Copy link
Collaborator

tmattio commented Jun 28, 2021

I have better things to do sorry

I can think of better ways to convey your point @ulugbekna 🙂

Let's assume best intentions here: Max is a valuable maintainer of vscode-ocaml-platform and his reviews are equally valuable.
He took the time to review the PR, so let's respect his time as much as I'm sure he respects the time of other contributors.

In particular, his suggestion (I'm sure he didn't feel strongly about it and meant it more as a suggestion than a blocker) on the function naming follows previous guidelines of the codebase, which ensure that the code stays readable for newcomers.
An example of a codebase that does not follow similar guidelines is Opam which I personally find very hard to get into.
So, surely, there are some solid arguments that can be made on the importance of function and variable naming.

I don't have a specific opinion on the above, but if there is a disagreement on a review, let's keep it friendly and professional. We all have the same goal here.

@ulugbekna
Copy link
Collaborator Author

I apologize to @mnxn if that sounded offensive. I assumed that his tone conveyed a suggesting character, which I turned down. Putting/omitting that character didn't change anything imho. I fully addressed the first round of comments, if necessary putting Max's suggestions/preferences above mine, e.g., using a named arg vs a type. I do, however, prefer to avoid bikeshed changes. I restrain myself from commenting on naming unless it would substantially make code easier to read. Nevertheless, I'm sorry if my comment above came off unprofessional.

I very much appreciate Max's work and how supportive he is of this repo. For example, I recall offering to implement a feature (reason config option that is?) Max brought up in one of the meetings if he himself needed that feature because I do care. And I will surely be happy to review any of Max's PRs or contribute to them.


The PR should be ready but still dependent on ocaml/ocaml-lsp#467. We should probably wait. I will comment in this PR when it's merged.

@mnxn
Copy link
Collaborator

mnxn commented Jun 28, 2021

Thank you for your apology, but I had no hard feelings. I understand that even though we are communicating in English, there can still be language differences. I know that I've had difficulties communicating my points before. I was more confused by the comment than anything, so I appreciate your clarification.

package.json Outdated Show resolved Hide resolved
src/import.ml Outdated Show resolved Hide resolved
@rgrinberg
Copy link
Contributor

I only briefly glance through the code, but given that Max reviewed this, it should be good to go. @mnxn did you try using this feature yet? We need to make sure the UI is solid too.

@mnxn
Copy link
Collaborator

mnxn commented Jun 29, 2021

did you try using this feature yet?

I have and it works well. I have not noticed any problems while using it.

@ulugbekna
Copy link
Collaborator Author

ulugbekna commented Jun 30, 2021

Jumping around holes using alt+l (for next hole) and alt+shift+l (for previous hole). Also showing the hole diagnostic at the beginning of the gif.

Screen.Recording.2021-06-30.at.11.19.34.mov

@ulugbekna ulugbekna force-pushed the jump-to-holes-ocamllsp-typedHoles branch from da030b8 to f0fb803 Compare June 30, 2021 06:29
@rgrinberg
Copy link
Contributor

Do you want to clean up the history yourself or shall I just squash everything?

@ulugbekna
Copy link
Collaborator Author

ulugbekna commented Jun 30, 2021 via email

@ulugbekna ulugbekna force-pushed the jump-to-holes-ocamllsp-typedHoles branch from f0fb803 to 81fc97b Compare June 30, 2021 16:42
@ulugbekna ulugbekna force-pushed the jump-to-holes-ocamllsp-typedHoles branch from 81fc97b to b24b9cc Compare June 30, 2021 16:46
@ulugbekna ulugbekna force-pushed the jump-to-holes-ocamllsp-typedHoles branch from b24b9cc to 162ed33 Compare June 30, 2021 16:56
@rgrinberg rgrinberg merged commit bb7d7e9 into ocamllabs:master Jun 30, 2021
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.

None yet

4 participants