fantomas
fantomas copied to clipboard
MultiLineLambdaClosingNewline + ExperimentalStroustrupStyle is not displaying very well for some use cases
Issue created from fantomas-online
Code
MudButton'() {
style { displayInlineBlock }
Disabled isLoading
OnClick(fun _ -> task {
setIsLoading true
do! hook.DownloadTransactionReports()
setIsLoading false
})
i18n.tran "Common.BtnDownload"
}
Result
MudButton'() {
style { displayInlineBlock }
Disabled isLoading
OnClick(fun _ -> task {
setIsLoading true
do! hook.DownloadTransactionReports()
setIsLoading false
}
)
i18n.tran "Common.BtnDownload"
}
Expected
Can we put
}
)
into one line ?
Problem description
Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.
Extra information
- [ ] The formatted result breaks my code.
- [ ] The formatted result gives compiler warnings.
- [ ] I or my company would be willing to help fix this.
Options
Fantomas master branch at 2022-07-19T14:35:52Z - 0fe6785076e045f28e4c88e6a57dd09b649ce671
{ config with
MultiLineLambdaClosingNewline = true
BlankLinesAroundNestedMultilineExpressions = false
ExperimentalStroustrupStyle = true }
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
Hello, on paper this sounds reasonable.
However, a lot will depend on the implementation. I would accept a PR if it can be solved in an elegant way. If there is too much church to get this right, this would be an acceptable limitation.
Are you interested in submitting a proposal PR?
Sorry, it maybe too complex to me.
Please elaborate on what might be too complex for you. We are working on a new documentation initiative https://github.com/fsprojects/fantomas/issues/2315 and hope to encourage people to contribute. A lack of knowledge of this project nor the F# language should not be a bottleneck. I'm curious to find out what is too complex about this or why you immediately assume this.