FsHotWatch.Fantomas
0.7.0-alpha.10
dotnet add package FsHotWatch.Fantomas --version 0.7.0-alpha.10
NuGet\Install-Package FsHotWatch.Fantomas -Version 0.7.0-alpha.10
<PackageReference Include="FsHotWatch.Fantomas" Version="0.7.0-alpha.10" />
<PackageVersion Include="FsHotWatch.Fantomas" Version="0.7.0-alpha.10" />
<PackageReference Include="FsHotWatch.Fantomas" />
paket add FsHotWatch.Fantomas --version 0.7.0-alpha.10
#r "nuget: FsHotWatch.Fantomas, 0.7.0-alpha.10"
#:package FsHotWatch.Fantomas@0.7.0-alpha.10
#addin nuget:?package=FsHotWatch.Fantomas&version=0.7.0-alpha.10&prerelease
#tool nuget:?package=FsHotWatch.Fantomas&version=0.7.0-alpha.10&prerelease
FsHotWatch.Fantomas
Plugin and preprocessor for Fantomas formatting. This package provides two components:
- FormatPreprocessor -- automatically formats files on save (before other plugins see the change)
- FormatCheckPlugin -- reports which files are not properly formatted (read-only, for CI)
Why
Running dotnet fantomas on every save is slow because it starts a new
process each time. The FormatPreprocessor runs in-process and formats
only the changed files, so formatting happens in milliseconds.
The preprocessor runs before other plugins receive the FileChanged
event, so format-on-save doesn't re-trigger the entire pipeline.
How it works
FormatPreprocessor (format-on-save):
- You save a file
- FormatPreprocessor receives the changed files before other plugins
- It formats each file with Fantomas in-process
- If the file changed, it writes the formatted version
- The daemon suppresses re-trigger events for files the preprocessor wrote
FormatCheckPlugin (format check):
- A file change event reaches the plugin
- It formats the file in memory and compares with the original
- Unformatted files are tracked and reported to the error ledger
Configuration
In .fshw.json:
{
"format": true
}
Set "format": false to disable the format-on-save preprocessor.
The format check plugin always runs alongside the preprocessor.
CLI
# Format all files
fshw format
# Query which files are unformatted
fshw unformatted
Programmatic usage
From the FullPipelineExample:
// Format-on-save preprocessor (runs before other plugins)
daemon.RegisterPreprocessor(FormatPreprocessor())
// Read-only format check plugin (reports unformatted files)
daemon.RegisterHandler(
FormatCheckPlugin.createFormatCheck
None // timeoutSec (None → 60s default)
)
Install
dotnet add package FsHotWatch.Fantomas
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Fantomas.Core (>= 7.0.5)
- FSharp.Core (>= 10.1.203)
- FsHotWatch (>= 0.8.0-alpha.12)
- System.Security.Cryptography.Xml (>= 10.0.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.0-alpha.10 | 52 | 4/29/2026 |
| 0.7.0-alpha.9 | 62 | 4/26/2026 |
| 0.7.0-alpha.8 | 51 | 4/25/2026 |
| 0.7.0-alpha.7 | 52 | 4/23/2026 |
| 0.7.0-alpha.3 | 53 | 4/18/2026 |
| 0.7.0-alpha.2 | 64 | 4/15/2026 |
| 0.6.0-alpha.1 | 55 | 4/12/2026 |
| 0.5.0-alpha.1 | 50 | 4/12/2026 |
| 0.3.0-alpha.1 | 57 | 4/8/2026 |
| 0.1.0-alpha.1 | 62 | 4/3/2026 |