Build Status Github Actions Discord

F# source code formatter, inspired by scalariform for Scala, ocp-indent for OCaml and PythonTidy for Python.


This project aims at formatting F# source files based on a given configuration. Fantomas will ensure correct indentation and consistent spacing between elements in the source files. We assume that the source files are parsable by F# compiler before feeding into the tool. Fantomas follows two F# style guides: the F# code formatting guidelines from Microsoft by default and the G-Research F# code formatting guidelines via various settings.

Contributing Guidelines

See the Contribution Guidelines.


We would like to gratefully thank the following persons for their contributions.


The library and tool are available under Apache 2.0 license. For more information see the License file.