FsHotWatch.Fantomas
0.7.0-alpha.20
See the version list below for details.
dotnet add package FsHotWatch.Fantomas --version 0.7.0-alpha.20
NuGet\Install-Package FsHotWatch.Fantomas -Version 0.7.0-alpha.20
<PackageReference Include="FsHotWatch.Fantomas" Version="0.7.0-alpha.20" />
<PackageVersion Include="FsHotWatch.Fantomas" Version="0.7.0-alpha.20" />
<PackageReference Include="FsHotWatch.Fantomas" />
paket add FsHotWatch.Fantomas --version 0.7.0-alpha.20
#r "nuget: FsHotWatch.Fantomas, 0.7.0-alpha.20"
#:package FsHotWatch.Fantomas@0.7.0-alpha.20
#addin nuget:?package=FsHotWatch.Fantomas&version=0.7.0-alpha.20&prerelease
#tool nuget:?package=FsHotWatch.Fantomas&version=0.7.0-alpha.20&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)
Status: early alpha, and a lot of it is AI-written. APIs shift between versions and rough edges are expected — your mileage may vary. Issues and PRs are very welcome.
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.400)
- FsHotWatch (>= 0.10.0-alpha.24)
- System.Security.Cryptography.Xml (>= 10.0.11)
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.23 | 49 | 9/4/2026 |
| 0.7.0-alpha.22 | 48 | 9/4/2026 |
| 0.7.0-alpha.21 | 55 | 9/1/2026 |
| 0.7.0-alpha.20 | 56 | 8/31/2026 |
| 0.7.0-alpha.19 | 100 | 8/17/2026 |
| 0.7.0-alpha.18 | 69 | 8/13/2026 |
| 0.7.0-alpha.16 | 62 | 8/3/2026 |
| 0.7.0-alpha.15 | 68 | 7/15/2026 |
| 0.7.0-alpha.14 | 79 | 6/24/2026 |
| 0.7.0-alpha.13 | 78 | 6/17/2026 |
| 0.7.0-alpha.12 | 71 | 6/9/2026 |
| 0.7.0-alpha.11 | 69 | 5/28/2026 |
| 0.7.0-alpha.10 | 85 | 4/29/2026 |
| 0.7.0-alpha.9 | 90 | 4/26/2026 |
| 0.7.0-alpha.8 | 69 | 4/25/2026 |
| 0.7.0-alpha.7 | 72 | 4/23/2026 |
| 0.7.0-alpha.3 | 74 | 4/18/2026 |
| 0.7.0-alpha.2 | 90 | 4/15/2026 |
| 0.6.0-alpha.1 | 78 | 4/12/2026 |
| 0.5.0-alpha.1 | 75 | 4/12/2026 |