FsHotWatch.Fantomas
0.3.0-alpha.1
dotnet add package FsHotWatch.Fantomas --version 0.3.0-alpha.1
NuGet\Install-Package FsHotWatch.Fantomas -Version 0.3.0-alpha.1
<PackageReference Include="FsHotWatch.Fantomas" Version="0.3.0-alpha.1" />
<PackageVersion Include="FsHotWatch.Fantomas" Version="0.3.0-alpha.1" />
<PackageReference Include="FsHotWatch.Fantomas" />
paket add FsHotWatch.Fantomas --version 0.3.0-alpha.1
#r "nuget: FsHotWatch.Fantomas, 0.3.0-alpha.1"
#:package FsHotWatch.Fantomas@0.3.0-alpha.1
#addin nuget:?package=FsHotWatch.Fantomas&version=0.3.0-alpha.1&prerelease
#tool nuget:?package=FsHotWatch.Fantomas&version=0.3.0-alpha.1&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 .fs-hot-watch.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
fs-hot-watch format
# Query which files are unformatted
fs-hot-watch 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 // getCommitId for caching
)
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.201)
- FsHotWatch (>= 0.3.0-alpha.1)
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.3.0-alpha.1 | 33 | 4/8/2026 |
| 0.1.0-alpha.1 | 44 | 4/3/2026 |