-
Notifications
You must be signed in to change notification settings - Fork 182
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: provide option for begin to align with end #2438
Comments
@Julow do you remember if this formatting was intentional? IIRC the reason would be that switching the value of |
I think @smasher164 changed himself the parens into The
But we can also consider that the
This is the way match cases are parenthesized and it's intended. I think you are asking for something else: an option to specially parenthesize matches. |
@Julow I think the suggested solution is parenthesized the same. The left-paren /
This is a valid point. However, the |
I don't think that's true. Nothing else can be indented that much in a case, the
However, this is bad:
The But what you want is for the
|
Yes, It'd be great it if there were an option that allowed this formatting. I find it easier to follow nested matches when the Thanks |
Unfortunately, there's no option for this. The formatting of |
I think (* no *)
| EProj (rcd, fld) -> begin
<expr>
end
(* yes *)
| EProj (rcd, fld) ->
begin
<expr>
end But Switch.run begin fun sw ->
traceln "In switch"
end;
traceln "Switch is finished" |
Given this snippet:
if i format this after setting
exp-grouping = preserve
, and change the parens tobegin
/end
, I seeBecause the
begin
is not aligned with theend
, it is awkward to see how theend
is supposed terminate thematch
. There is this form that occurs.Describe the solution you'd like
Provide the ability to require that the
begin
align with theend
, so it can look something like this:The text was updated successfully, but these errors were encountered: