De-indent the object keyword in class types#2425
Merged
Julow merged 4 commits intoocaml-ppx:mainfrom Sep 8, 2023
Merged
Conversation
The previous indentation of the keyword was ambiguous as it was aligned with the previous and next lines. This is similar to the formatting of module `struct`.
gpetiot
approved these changes
Sep 8, 2023
Collaborator
gpetiot
left a comment
There was a problem hiding this comment.
I love the new output tbh! Even in combination with break-separators=before it looks like an improvement to me.
LGTM!
Collaborator
Author
|
Let's include this in the next release. |
This was referenced Sep 8, 2023
Julow
added a commit
to Julow/opam-repository
that referenced
this pull request
Sep 15, 2023
….26.1) CHANGES: ### Changed - Compatible with OCaml 5.1.0 (ocaml-ppx/ocamlformat#2412, @Julow) The syntax of let-bindings changed sligthly in this version. - Improved ocp-indent compatibility (ocaml-ppx/ocamlformat#2428, @Julow) - \* Removed extra break in constructor declaration with comment (ocaml-ppx/ocamlformat#2429, @Julow) - \* De-indent the `object` keyword in class types (ocaml-ppx/ocamlformat#2425, @Julow) - \* Consistent formatting of arrows in class types (ocaml-ppx/ocamlformat#2422, @Julow) ### Fixed - Fix dropped attributes on a begin-end in a match case (ocaml-ppx/ocamlformat#2421, @Julow) - Fix dropped attributes on begin-end in an if-then-else branch (ocaml-ppx/ocamlformat#2436, @gpetiot) - Fix non-stabilizing comments before a functor type argument (ocaml-ppx/ocamlformat#2420, @Julow) - Fix crash caused by module types with nested `with module` (ocaml-ppx/ocamlformat#2419, @Julow) - Fix ';;' formatting between doc-comments and toplevel directives (ocaml-ppx/ocamlformat#2432, @gpetiot)
nberth
pushed a commit
to nberth/opam-repository
that referenced
this pull request
Jun 18, 2024
….26.1) CHANGES: ### Changed - Compatible with OCaml 5.1.0 (ocaml-ppx/ocamlformat#2412, @Julow) The syntax of let-bindings changed sligthly in this version. - Improved ocp-indent compatibility (ocaml-ppx/ocamlformat#2428, @Julow) - \* Removed extra break in constructor declaration with comment (ocaml-ppx/ocamlformat#2429, @Julow) - \* De-indent the `object` keyword in class types (ocaml-ppx/ocamlformat#2425, @Julow) - \* Consistent formatting of arrows in class types (ocaml-ppx/ocamlformat#2422, @Julow) ### Fixed - Fix dropped attributes on a begin-end in a match case (ocaml-ppx/ocamlformat#2421, @Julow) - Fix dropped attributes on begin-end in an if-then-else branch (ocaml-ppx/ocamlformat#2436, @gpetiot) - Fix non-stabilizing comments before a functor type argument (ocaml-ppx/ocamlformat#2420, @Julow) - Fix crash caused by module types with nested `with module` (ocaml-ppx/ocamlformat#2419, @Julow) - Fix ';;' formatting between doc-comments and toplevel directives (ocaml-ppx/ocamlformat#2432, @gpetiot)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first suggestion in #2423 (comment)
The previous indentation of the keyword was ambiguous as it was aligned with the previous and next lines.
This is similar to the formatting of module
struct.This is does not compose well with
break-separators=beforebut I still think it's better than before: