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

Inlay hints for implicit parenthesization #4214

Open
michaelpj opened this issue May 5, 2024 · 0 comments
Open

Inlay hints for implicit parenthesization #4214

michaelpj opened this issue May 5, 2024 · 0 comments
Labels

Comments

@michaelpj
Copy link
Collaborator

michaelpj commented May 5, 2024

Is your enhancement request related to a problem? Please describe.

When you are looking at code that uses a lot of operators, it's not always obvious how their various fixities will work out. One way of showing this would be to put in the implicit parentheses that show how the parser associates the operations. This would work nicely as an inlay hint, since you could also trigger the hint to insert the parentheses if you want to make things explicit.

Describe the solution you'd like

a * b + c / d

becomes

<hint>(</hint>a * b<hint>)>hint> + <hint>(</hint>c / d<hint>)</hint>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant