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

F# support or fantomas tool #1526

Open
jkone27 opened this issue Feb 23, 2022 · 4 comments
Open

F# support or fantomas tool #1526

jkone27 opened this issue Feb 23, 2022 · 4 comments

Comments

@jkone27
Copy link

jkone27 commented Feb 23, 2022

is there a way to also invoke Fantomas from dotnet format, making it the default for F# ?

https://github.com/fsprojects/fantomas/issues?q=is%3Aissue+is%3Aopen+dotnet+format

could be a nice integration useful to add support for fsharp as well (other than just C# and VB) and already supports .editorconfig

dotnet format

could also invoke fantomas in any .fsproj directory maybe ? just an idea

@JoeRobich
Copy link
Member

cc: @jmarolf

@jmarolf
Copy link
Contributor

jmarolf commented Feb 23, 2022

Long term, yes. Talked to the fantomas maintainers a while back and they where amenable to use including/calling into fantomas for F# projects. Would be willing to accept a community contribution if I am not getting around to it fast enough :) My understanding is that fantomas has disjoint formatting rules from C# and VB so it should be a simple drop-in

@rstm-sf
Copy link

rstm-sf commented Feb 15, 2024

Long term, yes. Talked to the fantomas maintainers a while back and they where amenable to use including/calling into fantomas for F# projects. Would be willing to accept a community contribution if I am not getting around to it fast enough :) My understanding is that fantomas has disjoint formatting rules from C# and VB so it should be a simple drop-in

Hello @jmarolf, what are plans now?

@JoeRobich
Copy link
Member

@rstm-sf At the moment there are no plans for F# support.

My thoughts on a possible implementation:

I do not think we would ship fantomas directly. When we encountered a F# project we would perform a check to see if the fantomas tool is installed. If not, we would log a message giving instructions on installing the fantomas tool. If so, we would shell out to fantomas for the F# projects in the workspace. As fantomas is a whitespace formatter, it would only run when whitespace formatting was being performed.

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

4 participants