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

Feature: Add blank line between type definition and members #752

Closed
nojaf opened this issue Apr 16, 2020 · 1 comment · Fixed by #758
Closed

Feature: Add blank line between type definition and members #752

nojaf opened this issue Apr 16, 2020 · 1 comment · Fixed by #758
Assignees

Comments

@nojaf
Copy link
Contributor

nojaf commented Apr 16, 2020

Description

Fantomas now adds type members directly underneath the definition.
Suggestion would be to introduce a setting to control if there should be a blank line between definition and members.

type Range =
    { From : float
      To : float }
    member this.Length = this.To - this.From

type MyRecord =
    { SomeField : int }
    interface IMyInterface

type Foo =
    | Bar
    | Meh
    member this.Fluey = ()

would become

type Range =
    { From : float
      To : float }

    member this.Length = this.To - this.From

type MyRecord =
    { SomeField : int }

    interface IMyInterface

type Foo =
    | Bar
    | Meh

    member this.Fluey = ()

Setting

Setting name could be something like NewlineBetweenTypeDefinitionAndMembers.
Other suggestions are welcome.
Default value would be false.

@nojaf nojaf self-assigned this Apr 16, 2020
@nojaf
Copy link
Contributor Author

nojaf commented Apr 16, 2020

@nojaf don't forget signature files ;)

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 a pull request may close this issue.

1 participant