The F# Formatting extension sets up Fantomas as the default formatter for F# files, configurable from Visual Studio's options.
Do note that the extension might not be up to date with the latest version of Fantomas.
- Install fantomas locally with
dotnet tool install fantomasand configure it as an External Tool.
- Open the external tool window by going to Tools -> Edit custom tools
- Click Add and fill in the information
- Run fantomas inside Tools -> fantomas