of March, 2020,
by Nikos Baxevanis.
Fantomas F# formatter in Visual Studio 2019
You can run Fantomas as an external tool from inside Visual Studio 2019 by using the Tools menu.
This technique should be compatible with
- Visual Studio 2015
- Visual Studio 2017
- Visual Studio 2019 (tested with 16.4.5)
- Clone and build the source code on your local
git clone email@example.com:fsprojects/fantomas.git fantomas && cd $_
dotnet tool restore
dotnet paket restore
dotnet fake run build.fsx
- Open the external tools dialog box by choosing Tools > External Tools
- Click Add, and then fill in the information
- You can also assign shortcut keys to it by choosing Tools > Options, expand Environment, and then choose Keyboard
The fsharp-support uses fantomas under the hood to format the source code. No need for any additional plugins.
Visual Studio Code
The recommended way to use Fantomas is by using the Ionide plugin. Fantomas is integrated in FSAutoComplete which is the language server used by Ionide.
Alternatively, you can install the fantomas-fmt extension.
Wish to comment?
You can comment on this post on GitHub.
Alternatively, you can discuss this post on Twitter or elsewhere with a permalink.
Ping me with the link, and I may respond.