Fantomas.Core 8.0.0-alpha-018

This is a prerelease version of Fantomas.Core.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Fantomas.Core --version 8.0.0-alpha-018
                    
NuGet\Install-Package Fantomas.Core -Version 8.0.0-alpha-018
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fantomas.Core" Version="8.0.0-alpha-018" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fantomas.Core" Version="8.0.0-alpha-018" />
                    
Directory.Packages.props
<PackageReference Include="Fantomas.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fantomas.Core --version 8.0.0-alpha-018
                    
#r "nuget: Fantomas.Core, 8.0.0-alpha-018"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fantomas.Core@8.0.0-alpha-018
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fantomas.Core&version=8.0.0-alpha-018&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Fantomas.Core&version=8.0.0-alpha-018&prerelease
                    
Install as a Cake Tool

Fantomas

Fantomas logo

GitHub Workflow Status (event) Discord Nuget (with prereleases) llms.txt llms-full.txt

An opinionated F# source code formatter.

dotnet tool install fantomas

Documentation is available at https://fsprojects.github.io/fantomas/docs/index.html

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.

Contributing Guidelines

See the Contribution Guidelines and our contributors documentation

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

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#.

Partas.Feliz.Generator

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0-alpha-022 0 8/27/2026
8.0.0-alpha-021 0 8/27/2026
8.0.0-alpha-020 6 8/27/2026
8.0.0-alpha-019 35 8/26/2026
8.0.0-alpha-018 32 8/26/2026
8.0.0-alpha-017 67 8/25/2026
8.0.0-alpha-016 68 8/25/2026
8.0.0-alpha-015 75 8/24/2026
8.0.0-alpha-014 85 8/20/2026
8.0.0-alpha-013 81 8/19/2026
8.0.0-alpha-012 145 4/16/2026
8.0.0-alpha-011 123 4/15/2026
8.0.0-alpha-010 121 4/15/2026
8.0.0-alpha-009 133 4/3/2026
8.0.0-alpha-008 143 3/25/2026
8.0.0-alpha-007 133 3/10/2026
8.0.0-alpha-006 126 3/9/2026
8.0.0-alpha-005 122 3/9/2026
8.0.0-alpha-004 123 3/7/2026
7.0.6 692 8/19/2026
Loading failed

### Added

- `doctor` names the `.fantomasignore` above the one that governs a file, when a pattern in it would have skipped that file. Fantomas reads the nearest ignore file at or above a file and no other, so a pattern written at the root of a repository has no effect on a folder that has an ignore file of its own beside it. Up to now the report named the ignore file that did decide and said nothing about the one that did not, which answers "which file" and leaves "then why did mine not" for the reader to work out. It quotes the pattern that would have matched, with its line number, the way it already quotes the line that decided. `--json` carries every ignore file above the governing one under `shadowed`, each with `wouldIgnore` and the lines of it that match, whether or not it would have decided anything. [#3423](https://github.com/fsprojects/fantomas/pull/3423)

### Changed

- The settings that ask for a space before the parenthesis of a call, `fsharp_space_before_uppercase_invocation` and `fsharp_space_before_lowercase_invocation`, now get a say only when the whole thing being called is a plain dotted name. Put a call, an index, a bracketed receiver, or a type application anywhere in it, and the parenthesis stays tight whatever the settings ask for. On default settings `xs.map(fun a -> a + 1).filter (fun a -> a > 1)` becomes `xs.map(fun a -> a + 1).filter(fun a -> a > 1)`, which is the report this started from, and `Foo().bar ()` and `myList.[7].someFunction (arg)` lose their space for the same reason. A plain dotted name is untouched however long it gets, so `List.map (f)` and `Fantomas.FCS.Text.Range.unionRanges (r1, r2)` keep the space they had, and so is a literal or type parameter receiver, since `"yow".Substring (0, 3)` and `'T.set_StaticProperty (3)` are atomic rather than bracketed. Agreed at [fslang-design#648](https://github.com/fsharp/fslang-design/issues/648) and written up under [Formatting chain expressions](https://fsprojects.github.io/fantomas/docs/contributors/Chains.html). [#3425](https://github.com/fsprojects/fantomas/pull/3425)
- A type application now makes a call tight with no chain in sight, which is the part of the change above most likely to catch you out, because it reaches ordinary generic calls rather than fluent code. On default settings `unbox<bool> (value)`, `f<int> (x)`, `List.map<int> (f)` and `jsOptions<Vis.Options> (fun o -> ...)` all lose their space, since `fsharp_space_before_lowercase_invocation` is `true` and each of those is a lower-case name carrying type arguments. An upper-case generic call such as `Dictionary<string, int>(x)` was already tight by default and only moves if `fsharp_space_before_uppercase_invocation` is on. Fantomas does not add parentheses, so the far more common form without them, `unbox<int> obj`, is left exactly as written and never comes into it. [#3425](https://github.com/fsprojects/fantomas/pull/3425)

### Fixed

- More expression forms count as open-ended, so a record, list, array or tuple that holds one of them in a non-last position stays multiline instead of collapsing onto a line that means something else. [#3279](https://github.com/fsprojects/fantomas/issues/3279) settled `fun`, `if`, `match` and `try`, and left the forms that wrap one of those or end in one: `lazy`, `yield`, `return`, `do`, `assert` and `fixed`, an assignment such as `x.P <- fun y -> y`, and `let x = 1 in body`. `{ A = 1; B = lazy fun x -> x; C = 3 }` reads back as a lambda that swallowed `C = 3`. A wrapper around something that closes on its own, `lazy a` or `x.P <- 1`, collapses as it always did. When this happens, why, and how to get the single line back is written up under [Open-ended expressions](https://fsprojects.github.io/fantomas/docs/end-users/OpenEndedExpressions.html). [#3424](https://github.com/fsprojects/fantomas/pull/3424)