-
Notifications
You must be signed in to change notification settings - Fork 180
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
Feature request: Update default profile to use indicate-multiline-delimiters = closing-on-separate-line #1958
Comments
A gentle ping - is there any chance of this happening? At work we've been sticking with 0.19.0 in large part because of this deprecation and I've done the same with personal projects. |
Hi, sorry for the late reply. I don't know if this option will be part of the default profile, this profile is driven by the maintainers of the mirage and the ocaml platform projects. @samoht @tmattio what do you think of having this setting by default? For the record I like this option as well, in other issues I mentioned that I would like to put together a profile that would be more diff-friendly than the default one, that would vertically unfold most of the code (kinda like the deprecated sparse profile without the unnecessary line breaks). And such profile would use this setting. |
Thank you @gpetiot - I've seen your comments about wanting a more diff-friendly format and I agree! Would it be more helpful for me to reframe this issue as a request for a more diff-friendly or newcomer friendly version of the default profile? I could also open a new issue for that purpose. I don't want to add issue noise though if that wouldn't be helpful for you. |
I don't think it's necessary to open an issue, I will get working on it soon and you can give feedback once the PR is open. |
Sounds good - thank you! |
I opened #2020, don't hesitate to give some feedback if you have time to give it a try! |
Thank you! I'll give it a try this week or next. |
I just tried the
IMHO, it's a good idea to have a default profile that is driven independently of any project or preference. I could definitely see this diff-friendly profile becoming the default and creating a |
Is your feature request related to a problem? Please describe.
The
indicate-multiline-delimiters = closing-on-separate-line
setting was deprecated in ocamlformat 0.20.0. I've personally found this feature very useful and had good feedback from other developers on the same codebase after it was introduced. In particular, it makes modifying anything with a closing delimiter easier because the last line of the delimited body is no longer special. This also makes diffs easier to understand as the)
/]
/}
no longer clutters diffs when the delimited body changes.Describe the solution you'd like
I would like to have
indicate-multiline-delimiters = closing-on-separate-line
as part of thedefault
profile. As @gpetiot pointed out to me, this will cause a lot of churn for users of thedefault
profile! So this seems like it's worth considering before a 1.0.0 release.Additional context
Issues:
indicate-multiline-delimiters=closing-on-separate-line
#1762PRs:
The text was updated successfully, but these errors were encountered: