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

Space before unit after long chain #18

Open
nojaf opened this issue Feb 17, 2021 · 2 comments
Open

Space before unit after long chain #18

nojaf opened this issue Feb 17, 2021 · 2 comments

Comments

@nojaf
Copy link
Contributor

nojaf commented Feb 17, 2021

Following up on a remark from @TobyShaw:
As fsharp_space_before_uppercase_invocation is configured true, Fantomas will add a space in the following code:

myExpr
    .Foo()
    .Bar()
    .Baz ()

Is that correct behaviour? Or is there an exception in this case?

@Smaug123
Copy link
Contributor

Hmm. Good question. Would it be easy for Fantomas to go either way? If so, I'd be inclined to suggest .Baz() on the last line instead of .Baz ().

@nojaf
Copy link
Contributor Author

nojaf commented Feb 19, 2021

Fantomas currently makes its decision based on configuration.
It checks if Baz starts with a capital and then checks fsharp_space_before_uppercase_invocation or fsharp_space_before_lowercase_invocation accordingly.

We could easily change that behaviour I think.

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

No branches or pull requests

2 participants