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

Tweak dune file formatting: avoid pure vertical layout when formatting wrapped lists #10892

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

Conversation

nojb
Copy link
Collaborator

@nojb nojb commented Sep 6, 2024

Fixes #10860

The effect of the change is illustrated in the tests.

cc @Khady

Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

LGTM. Changes entry please

@Khady
Copy link
Contributor

Khady commented Sep 7, 2024

Thanks! It would definitely help with run. I don't have a real opinion about the impact on other wrapped lists. From the diff it generally looks good. Two points where it could look worse are modules and libraries where it can be useful to have things kept in a alphabetical order to ease reading. I tend to think that the horizontal layout would be fine anyway.

@nojb
Copy link
Collaborator Author

nojb commented Sep 7, 2024

I don't have a real opinion about the impact on other wrapped lists.

Unfortunately, the formatter works at the level of s-expressions; so we don't really know the difference between "run" and other lists, so using different formatting for different types of wrapped lists is not straightforward at the moment.

Copy link
Contributor

@Khady Khady left a comment

Choose a reason for hiding this comment

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

thanks :)

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.

auto formatting of run shouldn't split its content into one word per line
3 participants