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

VS Code | Extra white space added to record definition #910

Closed
lqdev opened this issue Jun 11, 2020 · 1 comment · Fixed by #912
Closed

VS Code | Extra white space added to record definition #910

lqdev opened this issue Jun 11, 2020 · 1 comment · Fixed by #912

Comments

@lqdev
Copy link

lqdev commented Jun 11, 2020

Issue created from fantomas-online

Please describe here fantomas problem you encountered

Using VS Code with editor.formatOnSave set to true, given code like the one below on an fsx file, an extra line is always added to the first record type definition (in this case Commenter). Each time the fsx file is saved, a new line is added. It only happens on the first record type definition though. All other records are not affected.

Code

type Commenter =
    { [<JsonProperty("display_name")>]
      DisplayName: string }

type Message =
    { [<JsonProperty("body")>]
      Body: string }

Result

type Commenter =
    { [<JsonProperty("display_name")>]

      DisplayName: string }

type Message =
    { [<JsonProperty("body")>]
      Body: string }

Options

Fantomas Master at 06/11/2020 06:46:37 - 57496fa

Name Value
IndentSpaceNum 4
PageWidth 120
SemicolonAtEndOfLine false
SpaceBeforeParameter true
SpaceBeforeLowercaseInvocation true
SpaceBeforeUppercaseInvocation false
SpaceBeforeClassConstructor false
SpaceBeforeMember false
SpaceBeforeColon false
SpaceAfterComma true
SpaceBeforeSemicolon false
SpaceAfterSemicolon true
IndentOnTryWith false
SpaceAroundDelimiter true
MaxIfThenElseShortWidth 40
MaxInfixOperatorExpression 50
MaxRecordWidth 40
MaxArrayOrListWidth 40
MaxValueBindingWidth 40
MaxFunctionBindingWidth 40
MultilineBlockBracketsOnSameColumn false
NewlineBetweenTypeDefinitionAndMembers false
KeepIfThenInSameLine false
StrictMode false
@nojaf
Copy link
Contributor

nojaf commented Jun 11, 2020

Thanks for reporting this @lqdev, this rings a bell.
I'll check this out probably tomorrow.

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.

2 participants