Skip to content

Handle object expression inside a let in outline #1936

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

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

Conversation

Tim-ats-d
Copy link
Contributor

ocaml-lsp outline reports imbricated object inside let expression but merlin not. This fix aims to use merlin to generate outlines in ocaml-lsp without introduce regression in ocaml-lsp

The fix is ugly but I can refactor if needed.

cc @voodoos @xvw

Copy link
Collaborator

@xvw xvw left a comment

Choose a reason for hiding this comment

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

For me, the fix is not ugly! Good job!

Copy link
Collaborator

@voodoos voodoos left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Tim-ats-d !

I suspected that you could have a simpler implementation by relying more on the flat structure of the browse tree but I had to play with the code to find it, so i decided to directly push the change to your branch 🙈. Please have a look, it does remove quite a lot of the ad-hoc treatments:

0db503f

Apart from that, could you make the changelog entry more complete ? There is a "major' change in behavior here since before that patch Merlin outline's did not account for locally defined value, unlike ocaml-lsp. It seems reasonable to have them, but this should be made clear to users.

@voodoos voodoos added this to the 5.5 milestone May 20, 2025
@Tim-ats-d Tim-ats-d force-pushed the nested-let-outline branch from 0db503f to 9c2c72d Compare May 23, 2025 12:39
@Tim-ats-d Tim-ats-d requested a review from voodoos May 23, 2025 12:40
@Tim-ats-d
Copy link
Contributor Author

Please have a look, it does remove quite a lot of the ad-hoc treatments
Nice, I understand Mbrowse better now. Thank you for the help!

I have also edited the change entry.

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.

3 participants