Fantomas.Core
9.0.0-alpha-001
Prefix Reserved
See the version list below for details.
dotnet add package Fantomas.Core --version 9.0.0-alpha-001
NuGet\Install-Package Fantomas.Core -Version 9.0.0-alpha-001
<PackageReference Include="Fantomas.Core" Version="9.0.0-alpha-001" />
<PackageVersion Include="Fantomas.Core" Version="9.0.0-alpha-001" />
<PackageReference Include="Fantomas.Core" />
paket add Fantomas.Core --version 9.0.0-alpha-001
#r "nuget: Fantomas.Core, 9.0.0-alpha-001"
#:package Fantomas.Core@9.0.0-alpha-001
#addin nuget:?package=Fantomas.Core&version=9.0.0-alpha-001&prerelease
#tool nuget:?package=Fantomas.Core&version=9.0.0-alpha-001&prerelease
Fantomas

An opinionated F# source code formatter.
dotnet tool install fantomas
Documentation is available at https://fsprojects.github.io/fantomas/docs/
If you point a coding agent at Fantomas, give it llms.txt for an index of the documentation, or llms-full.txt for all of it in one file.
Reporting a bug
Report bugs through the online tool, which opens an issue with everything needed to reproduce it.
With a coding agent, the fantomas-report skill shrinks the file Fantomas failed on to a minimal sample and opens the same issue form for you to review:
npx skills add fsprojects/fantomas --skill fantomas-report -g
See Reporting a bug for more.
Contributing Guidelines
See the Contribution Guidelines and our contributors documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Fantomas.FCS (>= 9.0.0-alpha-001)
- FSharp.Core (>= 10.0.100)
- System.Collections.Immutable (>= 10.0.12)
- System.Diagnostics.DiagnosticSource (>= 10.0.12)
- System.Memory (>= 4.6.3)
- System.Runtime (>= 4.3.1)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Fantomas.Core:
| Package | Downloads |
|---|---|
|
Myriad.Core
Core Myriad library used for developing plugins |
|
|
Fantomas.Extras
Utility package for Fantomas |
|
|
WoofWare.Whippet.Fantomas
Helpers for accessing Fantomas syntax trees. |
|
|
Fabulous.AST
Fabulous.AST, an Abstract Syntax Tree (AST) Domain Specific Language (DSL) for F#. |
|
|
Morphir
Morphir executable package for AOT and single-file deployments |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0-alpha-002 | 102 | 10/21/2026 |
| 9.0.0-alpha-001 | 115 | 10/15/2026 |
| 8.1.3 | 77 | 11/19/2026 |
| 8.1.2 | 48 | 11/18/2026 |
| 8.1.1 | 781 | 11/3/2026 |
| 8.1.0 | 816 | 10/21/2026 |
| 8.0.10 | 915 | 10/14/2026 |
| 8.0.9 | 104 | 10/14/2026 |
| 8.0.8 | 148 | 10/9/2026 |
| 8.0.7 | 247 | 10/5/2026 |
| 8.0.6 | 151 | 10/1/2026 |
| 8.0.5 | 252 | 9/25/2026 |
| 8.0.4 | 160 | 9/23/2026 |
| 8.0.3 | 140 | 9/23/2026 |
| 8.0.2 | 422 | 9/22/2026 |
| 8.0.1 | 152 | 9/21/2026 |
| 8.0.0 | 296 | 9/15/2026 |
| 8.0.0-beta-003 | 110 | 9/12/2026 |
| 8.0.0-beta-002 | 117 | 9/8/2026 |
| 8.0.0-beta-001 | 149 | 9/1/2026 |
### Changed
- Fantomas checks that its output keeps every `//` and `(* *)` comment of the file. A format run searches its result for each of them, and does not write a result that is missing one, even when it is valid F#. The daemon that editors use refuses such output too, and output that is not valid F#, where it used to send both to the editor. `fantomas doctor` has a `Comments` step that checks, more thoroughly than a format run can afford, that the result keeps every comment and directive of the file under every define combination, a `Parse` step that lists the define combinations the file is parsed under, and ends on a `Verdict`: what a format run would do with the file. `CodeFormatter.FormatDocumentWithValidationsAsync` takes the checks to run as `Validations`, and `FormatResult` has a new field, `Issues`, with what they found, so code that constructs a `FormatResult` has to set it. `DefineParseException.Combinations` holds the defines of each combination that failed, rather than their names. [#1353](https://github.com/fsprojects/fantomas/issues/1353)
- On Linux x64, the `fantomas` tool is an executable compiled with Native AOT. It starts in milliseconds rather than first starting the .NET runtime. The `fantomas` package only names the packages per platform: `fantomas.linux-x64` and, for Alpine, `fantomas.linux-musl-x64` hold the executable, and every other platform installs `fantomas.any`, the tool as it shipped before. [#3171](https://github.com/fsprojects/fantomas/issues/3171)