This extension serves as the default code formatter for F# source files (.fs
, .fsi
, .fsx
).
Formatting is generated by the wonderful Fantomas project.
- Format Document
- Format Selection
- Format On Save
- Supports editorconfig
- Patching in formatting changes
- Fast, in-process formatting
- Fully asynchronous, does not increase project load times
- Loaded when required
- Respects key-bindings
This extension supports editor config, for documentation of the options see Fantomas documentation.
If no settings can be found for a file, the user profile's formatting options are used.
These can be configured from F# Tools > Formatting
Any custom key-bindings for Format Document/Selection are respected. The default key-bindings are ctrl-k + ctrl-d
for document formatting and ctrl-k + ctrl-f
for formatting a selection.
If you see an issue with the Visual Studio integration or with configuration, please file it here.
F# Formatting is available under the MIT license.