Skip to content
SPECIFICTION
Get listed

CSharpier vs Fantomas

CSharpier

csharpier.com

Fantomas

fsprojects.github.io

Side by side

FigureCSharpierFantomas
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Web—Yes
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Plans published11
Spec score · Code Formatting Tools8.0 (#8)8.0 (#9)
ConfigurationConfiguration can use .csharpierrc JSON or YAML files or .editorconfig, with options including print width, tabs, indentation, and line endings.A limited set of formatting options can be stored in `.editorconfig` and read automatically by the command line tool.
Editor integrationsOfficial extensions or plugins are listed for Visual Studio 2022, Visual Studio 2019, Visual Studio Code, and Rider; the page also describes setups for Neovim, Emacs, and Zed.The maker provides setup guides for JetBrains Rider, Visual Studio Code, and Visual Studio.
PurposeCSharpier parses C# and XML code and reprints it using its own formatting rules.Fantomas is an opinionated formatter for F# source code that formats files based on configuration.

Plans

CSharpier

  • FreeFree

CSharpier pricing →

Fantomas

  • FantomasFree

Fantomas pricing →

In their own words

CSharpier

CSharpier is a free, open-source formatter for C# and XML. It parses source files and reprints them using its own formatting rules, with only a few basic options rather than a broad set of style switches. The homepage states support through C# version 14. Configuration can be kept in .csharpierrc JSON or YAML files or in .editorconfig, covering print width, tabs, indentation, and line endings. CSharpier runs as a .NET tool, installed for one project or globally, and CSharpier.Core provides a NuGet API for formatting from code. It can check files and returns a failing exit code by default when formatting is incorrect. Automation options include pre-commit hooks, MSBuild builds, and CI/CD workflows. Integrations are listed for Visual Studio 2022 and 2019, Visual Studio Code, Rider, Neovim, Emacs, and Zed. It runs on Windows, macOS, and Linux. Code that cannot compile produces error diagnostics instead of being formatted.

Visit csharpier.com

Fantomas

Fantomas formats F# source code according to configuration, using default rules based on Microsoft’s F# style guide. Settings are also available for G-Research conventions. It runs as a .NET tool, and local installation is recommended when a repository needs to keep a fixed version. The command line accepts folders or files with `.fs`, `.fsi`, `.fsx`, `.ml` or `.mli` extensions; source files are expected to parse with the F# compiler before formatting. A limited selection of options can be placed in `.editorconfig` for automatic use by the command-line tool. For continuous integration checks, `dotnet fantomas check` reports formatting drift and exits with a failure code when files need formatting. Setup guides are available for JetBrains Rider, Visual Studio Code and Visual Studio, and the official site links to an online tool for trying the formatter and its settings. Fantomas and its library are available under the Apache 2.0 license. The project is described as an fsprojects incubation project. It is free and open source, with web access listed alongside Linux, macOS and Windows.

Visit fsprojects.github.io