Header menu logo fantomas

Configuration

Fantomas ships with a limited series of options. These can be stored in an .editorconfig file and will be picked up automatically by the commandline.
Your IDE should respect your settings, however the implementation of that is editor specific. Setting the configuration via UI might be available depending on the IDE.

version: 6.3.0-alpha-008+d1c03c393bf7f43a3e0818d0861b52b2d774e12f

Usage

Inside .editorconfig you can specify the file extension and code location to be use per config:

[*.fs]
fsharp_space_before_uppercase_invocation = true

# Write a comment by starting the line with a '#'
[*.{fs,fsx,fsi}]
fsharp_bar_before_discriminated_union_declaration = true

# Apply specific settings for a targeted subfolder
[src/Elmish/View.fs]
fsharp_multiline_bracket_style = stroustrup

Trying your settings via the online tool

You can quickly try your settings via the online tool.

drawing
open Fantomas.Core

let formatCode input configIndent =
    async {
        let! result = CodeFormatter.FormatDocumentAsync(false, input, configIndent)
        printf $"%s{result.Code}"
    }
    |> Async.RunSynchronously

Settings recommendations

Fantomas ships with a series of settings that you can use freely depending on your case.
However, there are settings that we do not recommend and generally should not be used.

Safe to change: Settings that aren't attached to any guidelines. Depending on your team or your own preferences, feel free to change these as it's been agreed on the codebase, however, you can always use it's defaults.

Use with caution: Settings where it is not recommended to change the default value. They might lead to incomplete results.

Do not use: Settings that don't follow any guidelines.

G-Research: G-Research styling guide. If you use one of these, for consistency reasons you should use all of them.

Copy button: This copies the .editorconfig setting text you need to change the default. ⚠️ The copied text will not contain the default value.

Auxiliary settings

indent_size

indent_size has to be between 1 and 10.

This preference sets the indentation The common values are 2 and 4.
The same indentation is ensured to be consistent in a source file.

Default = 4
formatCode
    """ 
    let inline selectRandom (f: _ []) =
      let r = random 1.0

      let rec find =
          function
          | 0 -> fst f.[0]
          | n when r < snd f.[n] -> fst f.[n]
          | n -> find (n - 1)

      find <| f.Length - 1
    """
    { FormatConfig.Default with
        IndentSize = 2 }
let inline selectRandom (f: _[]) =
  let r = random 1.0

  let rec find =
    function
    | 0 -> fst f.[0]
    | n when r < snd f.[n] -> fst f.[n]
    | n -> find (n - 1)

  find <| f.Length - 1

max_line_length

max_line_length has to be an integer greater or equal to 60.
This preference sets the column where we break F# constructs into new lines.

Default = 120
formatCode
    """ 
    match myValue with
    | Some foo -> someLongFunctionNameThatWillTakeFooAndReturnsUnit foo
    | None -> printfn "nothing"
    """
    { FormatConfig.Default with
        MaxLineLength = 60 }
match myValue with
| Some foo ->
    someLongFunctionNameThatWillTakeFooAndReturnsUnit foo
| None -> printfn "nothing"

end_of_line

end_of_line determines the newline character, lf will add \n where crlf will add \r\n.
cr is not supported by the F# language spec.
If not set by the user, the default value is determined by System.Environment.NewLine.

insert_final_newline

Adds a final newline character at the end of the file.
Why should text files end with a newline?

Default = true
formatCode
    """ 
    let a = 42
    """
    { FormatConfig.Default with
        InsertFinalNewline = false }
let a = 42

fsharp_space_before_parameter

Add a space after the name of a function and before the opening parenthesis of the first parameter.
This setting influences function definitions.

Default = true
formatCode
    """ 
   let value (a: int) = x
   let DumpTrace() = ()
    """
    { FormatConfig.Default with
        SpaceBeforeParameter = false }
let value(a: int) = x
let DumpTrace() = ()

fsharp_space_before_lowercase_invocation

Add a space after the name of a lowercased function and before the opening parenthesis of the first argument.
This setting influences function invocation in expressions and patterns.

Default = true
formatCode
    """ 
value (a, b)
startTimer ()

match x with
| value (a, b) -> ()
    """
    { FormatConfig.Default with
        SpaceBeforeLowercaseInvocation = false }
value(a, b)
startTimer()

match x with
| value(a, b) -> ()

fsharp_space_before_uppercase_invocation

Add a space after the name of a uppercase function and before the opening parenthesis of the first argument.
This setting influences function invocation in expressions and patterns.

Default = false
formatCode
    """ 
Value(a, b)
person.ToString()

match x with
| Value(a, b) -> ()
    """
    { FormatConfig.Default with
        SpaceBeforeUppercaseInvocation = true }
Value (a, b)
person.ToString ()

match x with
| Value (a, b) -> ()

fsharp_space_before_class_constructor

Add a space after a type name and before the class constructor.

Default = false
formatCode
    """ 
    type Person() =
        class
        end
    """
    { FormatConfig.Default with
        SpaceBeforeClassConstructor = true }
type Person () = class end

fsharp_space_before_member

Add a space after a member name and before the opening parenthesis of the first parameter.

Default = false
formatCode
    """ 
    type Person() =
        member this.Walk(distance: int) = ()
        member this.Sleep() = ignore
        member __.singAlong() = ()
        member __.swim(duration: TimeSpan) = ()
    """
    { FormatConfig.Default with
        SpaceBeforeMember = true }
type Person() =
    member this.Walk (distance: int) = ()
    member this.Sleep () = ignore
    member __.singAlong () = ()
    member __.swim (duration: TimeSpan) = ()

fsharp_space_before_colon

Add a space before :. Please note that not every : is controlled by this setting.

Default = false
formatCode
    """ 
   type Point = { x: int; y: int }
   let myValue: int = 42
   let update (msg: Msg) (model: Model) : Model = model
    """
    { FormatConfig.Default with
        SpaceBeforeColon = true }
type Point = { x : int; y : int }
let myValue : int = 42
let update (msg : Msg) (model : Model) : Model = model

fsharp_space_after_comma

Adds a space after , in tuples.

Default = true
formatCode
    """ 
    myValue.SomeFunction(foo, bar, somethingElse)
    (a, b, c)
    """
    { FormatConfig.Default with
        SpaceAfterComma = false }
myValue.SomeFunction(foo,bar,somethingElse)
(a,b,c)

fsharp_space_before_semicolon

Adds a space before ; in records, arrays, lists, etc.

Default = false
formatCode
    """ 
    let a = [ 1 ; 2 ; 3 ]
    let b = [| foo ; bar |]
    type C = { X: int ; Y: int }
    """
    { FormatConfig.Default with
        SpaceBeforeSemicolon = true }
let a = [ 1 ; 2 ; 3 ]
let b = [| foo ; bar |]
type C = { X: int ; Y: int }

fsharp_space_after_semicolon

Adds a space after ; in records, arrays, lists, etc.

Default = true
formatCode
    """ 
    let a = [ 1; 2; 3 ]
    let b = [| foo; bar |]
    type C = { X: int; Y: int }
    """
    { FormatConfig.Default with
        SpaceAfterSemicolon = false }
let a = [ 1;2;3 ]
let b = [| foo;bar |]
type C = { X: int;Y: int }

fsharp_space_around_delimiter

Adds a space around delimiters like [,[|,{`.

Default = true
formatCode
    """ 
    let a = [ 1;2;3 ]
    let b = [| 4;5;6 |]
    """
    { FormatConfig.Default with
        SpaceAroundDelimiter = false }
let a = [1; 2; 3]
let b = [|4; 5; 6|]

Maximum width constraints

Settings that control the max width of certain expressions.

fsharp_max_if_then_short_width

Control the maximum length for which if/then expression without an else expression can be on one line.
The Microsoft F# style guide recommends to never write such an expression in one line.

If the else expression is absent, it is recommended to never to write the entire expression in one line.

Default = 0
formatCode
    """ 
    if a then 
        ()
    """
    { FormatConfig.Default with
        MaxIfThenShortWidth = 15 }
if a then ()

fsharp_max_if_then_else_short_width

Fantomas by default follows the if/then/else conventions listed in the Microsoft F# style guide.
This setting facilitates this by determining the maximum character width where the if/then/else expression stays in one line.

Default = 60
formatCode
    """ 
    if myCheck then truth else bogus
    """
    { FormatConfig.Default with
        MaxIfThenElseShortWidth = 10 }
if myCheck then
    truth
else
    bogus

fsharp_max_infix_operator_expression

Control the maximum length for which infix expression can be on one line.

Default = 80
formatCode
    """ 
    let WebApp =
        route "/ping" >=> authorized >=> text "pong"
    """
    { FormatConfig.Default with
        MaxInfixOperatorExpression = 20 }
let WebApp =
    route "/ping"
    >=> authorized
    >=> text "pong"

fsharp_max_record_width

Control the maximum width for which records should be in one line.

Requires fsharp_record_multiline_formatter to be character_width to take effect.

Default = 40
formatCode
    """ 
    type MyRecord = { X: int; Y: int; Length: int }
    let myInstance = { X = 10; Y = 20; Length = 90 }
    """
    { FormatConfig.Default with
        MaxRecordWidth = 20 }
type MyRecord =
    { X: int
      Y: int
      Length: int }

let myInstance =
    { X = 10
      Y = 20
      Length = 90 }

fsharp_max_record_number_of_items

Control the maximum number of fields for which records should be in one line.

Requires fsharp_record_multiline_formatter to be number_of_items to take effect.

Default = 1
formatCode
    """ 
    type R = { x: int }

    type S = { x: int; y: string }

    type T = { x: int; y: string; z: float }

    let myRecord = { r = 3 }

    let myRecord' = { r with x = 3 }

    let myRecord'' = { r with x = 3; y = "hello" }

    let myRecord''' = { r with x = 3; y = "hello"; z = 0.0 }
    """
    { FormatConfig.Default with
        MaxRecordNumberOfItems = 2
        RecordMultilineFormatter = MultilineFormatterType.NumberOfItems }
type R = { x: int }

type S = { x: int; y: string }

type T =
    { x: int
      y: string
      z: float }

let myRecord = { r = 3 }

let myRecord' = { r with x = 3 }

let myRecord'' = { r with x = 3; y = "hello" }

let myRecord''' =
    { r with
        x = 3
        y = "hello"
        z = 0.0 }

fsharp_record_multiline_formatter

Split records expressions/statements into multiple lines based on the given condition.
character_width uses character count of the expression, controlled by fsharp_max_record_width.
number_of_items uses the number of fields in the record, controlled by fsharp_max_record_number_of_items.

Note that in either case, record expressions/statements are still governed by max_line_length.

Default = character_width
formatCode
    """ 
    type R = { x: int }

    type S = { x: int; y: string }

    let myRecord = { r = 3 }

    let myRecord' = { r with x = 3 }

    let myRecord'' = { r with x = 3; y = "hello" }
    """
    { FormatConfig.Default with
        RecordMultilineFormatter = MultilineFormatterType.NumberOfItems }
type R = { x: int }

type S =
    { x: int
      y: string }

let myRecord = { r = 3 }

let myRecord' = { r with x = 3 }

let myRecord'' =
    { r with
        x = 3
        y = "hello" }

fsharp_max_array_or_list_width

Control the maximum width for which lists and arrays can be in one line.

Requires fsharp_array_or_list_multiline_formatter to be character_width to take effect

Default = 80
formatCode
    """ 
    let myArray = [| one; two; three |]
    """
    { FormatConfig.Default with
        MaxArrayOrListWidth = 20 }
let myArray =
    [| one
       two
       three |]

fsharp_max_array_or_list_number_of_items

Control the maximum number of elements for which lists and arrays can be in one line.

Requires fsharp_array_or_list_multiline_formatter to be number_of_items to take effect.

Default = 1
formatCode
    """ 
    let myList = [ one; two ]
    let myArray = [| one; two; three |]
    """
    { FormatConfig.Default with
        MaxArrayOrListNumberOfItems = 2
        ArrayOrListMultilineFormatter = MultilineFormatterType.NumberOfItems }
let myList = [ one; two ]

let myArray =
    [| one
       two
       three |]

fsharp_array_or_list_multiline_formatter

Split arrays and lists into multiple lines based on the given condition.
character_width uses character count of the expression, controlled by fsharp_max_array_or_list_width.
number_of_items uses the number of elements in the array or list, controlled by fsharp_max_array_or_list_number_of_items.

Note that in either case, list expressions are still governed by max_line_length.

Default = character_width
formatCode
    """ 
    let myArray = [| one; two; three |]
    """
    { FormatConfig.Default with
        ArrayOrListMultilineFormatter = MultilineFormatterType.NumberOfItems }
let myArray =
    [| one
       two
       three |]

fsharp_max_value_binding_width

Control the maximum expression width for which let and member value/property bindings should be in one line.
The width is that of the pattern for the binding plus the right-hand expression but not the keywords (e.g. "let").

Default = 80
formatCode
    """ 
    let title = "Great title of project"
    type MyType() =
        member this.HelpText = "Some help text"
    """
    { FormatConfig.Default with
        MaxValueBindingWidth = 10 }
let title =
    "Great title of project"

type MyType() =
    member this.HelpText =
        "Some help text"

fsharp_max_function_binding_width

Control the maximum width for which function and member bindings should be in one line.
In contrast to fsharp_max_value_binding_width, only the right-hand side expression of the binding is measured.

Default = 40
formatCode
    """ 
    let title = "Great title of project"
    type MyType() =
        member this.HelpText = "Some help text"
    """
    { FormatConfig.Default with
        MaxFunctionBindingWidth = 10 }
let title = "Great title of project"

type MyType() =
    member this.HelpText = "Some help text"

fsharp_max_dot_get_expression_width

Control the maximum width for which (nested) SynExpr.DotGet expressions should be in one line.

Default = 80
formatCode
    """ 
   let job = JobBuilder.UsingJobData(jobDataMap).Create<WrapperJob>().Build()
    """
    { FormatConfig.Default with
        MaxDotGetExpressionWidth = 60 }
let job =
    JobBuilder
        .UsingJobData(jobDataMap)
        .Create<WrapperJob>()
        .Build()

fsharp_multiline_bracket_style

Cramped The default way in F# to format brackets.
Aligned Alternative way of formatting records, arrays and lists. This will align the braces at the same column level.
Stroustrup Allow for easier reordering of members and keeping the code succinct.

Default = cramped
formatCode
    """ 
    let myRecord =
        { Level = 1
          Progress = "foo"
          Bar = "bar"
          Street = "Bakerstreet"
          Number = 42 }

    type Range =
        { From: float
          To: float
          FileName: string }

    let a =
        [| (1, 2, 3)
           (4, 5, 6)
           (7, 8, 9)
           (10, 11, 12)
           (13, 14, 15)
           (16, 17,18)
           (19, 20, 21) |]
    """
    { FormatConfig.Default with
        MultilineBracketStyle = Aligned }
let myRecord =
    {
        Level = 1
        Progress = "foo"
        Bar = "bar"
        Street = "Bakerstreet"
        Number = 42
    }

type Range =
    {
        From: float
        To: float
        FileName: string
    }

let a =
    [|
        (1, 2, 3)
        (4, 5, 6)
        (7, 8, 9)
        (10, 11, 12)
        (13, 14, 15)
        (16, 17, 18)
        (19, 20, 21)
    |]
formatCode
    """ 
    let myRecord =
        { Level = 1
          Progress = "foo"
          Bar = "bar"
          Street = "Bakerstreet"
          Number = 42 }

    type Range =
        { From: float
          To: float
          FileName: string }

    let a =
        [| (1, 2, 3)
           (4, 5, 6)
           (7, 8, 9)
           (10, 11, 12)
           (13, 14, 15)
           (16, 17,18)
           (19, 20, 21) |]
    """
    { FormatConfig.Default with
        MultilineBracketStyle = Stroustrup }
let myRecord = {
    Level = 1
    Progress = "foo"
    Bar = "bar"
    Street = "Bakerstreet"
    Number = 42
}

type Range = {
    From: float
    To: float
    FileName: string
}

let a = [|
    (1, 2, 3)
    (4, 5, 6)
    (7, 8, 9)
    (10, 11, 12)
    (13, 14, 15)
    (16, 17, 18)
    (19, 20, 21)
|]

fsharp_newline_before_multiline_computation_expression

Insert a newline before a computation expression that spans multiple lines

Default = true
formatCode
    """ 
    let something =
        task {
            let! thing = otherThing ()
            return 5
        }
    """
    { FormatConfig.Default with
        NewlineBeforeMultilineComputationExpression = false }
let something = task {
    let! thing = otherThing ()
    return 5
}

G-Research style

A series of settings requicolor="red" to conform with the G-Research style guide.
From a consistency point of view, it is recommend to enable all these settings instead of cherry-picking a few.

fsharp_newline_between_type_definition_and_members

Adds a new line between a type definition and its first member.

Default = true
formatCode
    """ 
type Range =
    { From: float
      To: float }

    member this.Length = this.To - this.From
    """
    { FormatConfig.Default with
        NewlineBetweenTypeDefinitionAndMembers = false }
type Range =
    { From: float
      To: float }

    member this.Length = this.To - this.From

fsharp_align_function_signature_to_indentation

When a function signature exceeds the max_line_length, Fantomas will put all parameters on separate lines.
This setting also places the equals sign and return type on a new line.

Default = false
formatCode
    """ 
[<FunctionName("FormatCode")>]
let run 
    ([<HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "{*any}")>] req: HttpRequest)
    (log: ILogger)
    : HttpResponse =
    Http.main CodeFormatter.GetVersion format FormatConfig.FormatConfig.Default log req
    """
    { FormatConfig.Default with
        AlignFunctionSignatureToIndentation = true }
[<FunctionName("FormatCode")>]
let run
    ([<HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = "{*any}")>] req: HttpRequest)
    (log: ILogger)
    : HttpResponse
    =
    Http.main CodeFormatter.GetVersion format FormatConfig.FormatConfig.Default log req

fsharp_alternative_long_member_definitions

Provides an alternative way of formatting long member and constructor definitions, where the difference is mainly in the equal sign and returned type placement.

Default = false
formatCode
    """ 
type C
    (
        aVeryLongType: AVeryLongTypeThatYouNeedToUse,
        aSecondVeryLongType: AVeryLongTypeThatYouNeedToUse,
        aThirdVeryLongType: AVeryLongTypeThatYouNeedToUse
    ) =
    class
    end

type D() =
    member _.LongMethodWithLotsOfParameters
        (
            aVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongParam: AVeryLongTypeThatYouNeedToUse
        ) : ReturnType =
        42

type E() =
    new
        (
            aVeryLongType: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongType: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongType: AVeryLongTypeThatYouNeedToUse
        ) = E()
    """
    { FormatConfig.Default with
        AlternativeLongMemberDefinitions = true }
type C
    (
        aVeryLongType: AVeryLongTypeThatYouNeedToUse,
        aSecondVeryLongType: AVeryLongTypeThatYouNeedToUse,
        aThirdVeryLongType: AVeryLongTypeThatYouNeedToUse
    )
    = class end

type D() =
    member _.LongMethodWithLotsOfParameters
        (
            aVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongParam: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongParam: AVeryLongTypeThatYouNeedToUse
        )
        : ReturnType
        =
        42

type E() =
    new
        (
            aVeryLongType: AVeryLongTypeThatYouNeedToUse,
            aSecondVeryLongType: AVeryLongTypeThatYouNeedToUse,
            aThirdVeryLongType: AVeryLongTypeThatYouNeedToUse
        )
        =
        E()

fsharp_multi_line_lambda_closing_newline

Places the closing parenthesis of a multiline lambda argument on the next line.

Default = false
formatCode
    """ 
let printListWithOffset a list1 =
    List.iter
        (fun { ItemOne = a } ->
            // print
            printfn "%s" a)
        list1

let printListWithOffset a list1 =
    list1
    |> List.iter
        (fun elem ->
            // print stuff
            printfn "%d" (a + elem))
    """
    { FormatConfig.Default with
        MultiLineLambdaClosingNewline = true }
let printListWithOffset a list1 =
    List.iter
        (fun { ItemOne = a } ->
            // print
            printfn "%s" a
        )
        list1

let printListWithOffset a list1 =
    list1
    |> List.iter (fun elem ->
        // print stuff
        printfn "%d" (a + elem)
    )

fsharp_experimental_keep_indent_in_branch

Breaks the normal indentation flow for the last branch of a pattern match or if/then/else expression.
Only when the last pattern match or else branch was already at the same level of the entire match or if expression.

This feature is considecolor="red" experimental and is subject to change.

formatCode
    """ 
let main argv =
    let args = parse argv

    let instructions = Library.foo args

    if args.DryRun = RunMode.Dry then
        printfn "Would execute actions, but --dry-run was supplied: %+A" instructions
        0
    else

    // proceed with main method
    let output = Library.execute instructions
    // do more stuff
    0
    """
    { FormatConfig.Default with
        ExperimentalKeepIndentInBranch = true }
let main argv =
    let args = parse argv

    let instructions = Library.foo args

    if args.DryRun = RunMode.Dry then
        printfn "Would execute actions, but --dry-run was supplied: %+A" instructions
        0
    else

    // proceed with main method
    let output = Library.execute instructions
    // do more stuff
    0

fsharp_bar_before_discriminated_union_declaration

Always use a | before every case in the declaration of a discriminated union.
If false, a | character is used only in multiple-case discriminated unions, and is omitted in short single-case DUs.

Default = false
formatCode
    """ 
    type MyDU = Short of int
    """
    { FormatConfig.Default with
        BarBeforeDiscriminatedUnionDeclaration = true }
type MyDU = | Short of int

Other

Some additional settings that don't fit into any style guide.

fsharp_blank_lines_around_nested_multiline_expressions

Surround nested multi-line expressions with blank lines.
Existing blank lines are always preserved (via trivia), with exception when fsharp_keep_max_number_of_blank_lines is used.
Top level expressions will always follow the 2020 blank lines revision principle.

Default = true
formatCode
    """ 
    let topLevelFunction () =
        printfn "Something to print"

        try
                nothing ()
        with
        | ex ->
            splash ()
        ()

    let secondTopLevelFunction () =
        // ...
        ()
    """
    { FormatConfig.Default with
        BlankLinesAroundNestedMultilineExpressions = false }
let topLevelFunction () =
    printfn "Something to print"

    try
        nothing ()
    with ex ->
        splash ()
    ()

let secondTopLevelFunction () =
    // ...
    ()

fsharp_keep_max_number_of_blank_lines

Set maximal number of consecutive blank lines to keep from original source. It doesn't change number of new blank lines generated by Fantomas.

Default = 100
formatCode
    """ 
    open Foo

    let x = 42
    """
    { FormatConfig.Default with
        KeepMaxNumberOfBlankLines = 1 }
open Foo

let x = 42

fsharp_experimental_elmish

Applies the Stroustrup style to the final (two) array or list argument(s) in a function application.
Note that this behaviour is also active when fsharp_multiline_bracket_style = stroustrup.

Default = false
formatCode
    """ 
let dualList =
    div
        []
        [
            h1 [] [ str "Some title" ]
            ul
                []
                [
                    for p in model.Points do
                        li [] [ str $"%i{p.X}, %i{p.Y}" ]
                ]
            hr []
        ]

let singleList =
    Html.div
        [
            Html.h1 [ str "Some title" ]
            Html.ul
                [
                    for p in model.Points do
                        Html.li [ str $"%i{p.X}, %i{p.Y}" ]
                ]
        ]
    """
    { FormatConfig.Default with
        ExperimentalElmish = true }
let dualList =
    div [] [
        h1 [] [ str "Some title" ]
        ul [] [
            for p in model.Points do
                li [] [ str $"%i{p.X}, %i{p.Y}" ]
        ]
        hr []
    ]

let singleList =
    Html.div [
        Html.h1 [ str "Some title" ]
        Html.ul [
            for p in model.Points do
                Html.li [ str $"%i{p.X}, %i{p.Y}" ]
        ]
    ]
val printf: format: Printf.TextWriterFormat<'T> -> 'T
namespace Fantomas
namespace Fantomas.Core
type CodeFormatter = static member FormatASTAsync: ast: ParsedInput -> Async<string> + 2 overloads static member FormatDocumentAsync: isSignature: bool * source: string -> Async<FormatResult> + 2 overloads static member FormatOakAsync: oak: Oak -> Async<string> + 1 overload static member FormatSelectionAsync: isSignature: bool * source: string * selection: range -> Async<string * range> + 1 overload static member GetVersion: unit -> string static member IsValidFSharpCodeAsync: isSignature: bool * source: string -> Async<bool> static member MakePosition: line: int * column: int -> pos static member MakeRange: fileName: string * startLine: int * startCol: int * endLine: int * endCol: int -> range static member ParseAsync: isSignature: bool * source: string -> Async<(ParsedInput * string list) array> static member ParseOakAsync: isSignature: bool * source: string -> Async<(Oak * string list) array> ...
static member CodeFormatter.GetVersion: unit -> string
val formatCode: input: string -> configIndent: FormatConfig -> unit
val input: string
val configIndent: FormatConfig
val async: AsyncBuilder
val result: FormatResult
static member CodeFormatter.FormatDocumentAsync: isSignature: bool * source: string -> Async<FormatResult>
static member CodeFormatter.FormatDocumentAsync: isSignature: bool * source: string * config: FormatConfig -> Async<FormatResult>
static member CodeFormatter.FormatDocumentAsync: isSignature: bool * source: string * config: FormatConfig * cursor: Fantomas.FCS.Text.pos -> Async<FormatResult>
FormatResult.Code: string
<summary> Formatted code </summary>
Multiple items
module Async from Fantomas.Core

--------------------
type Async = static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> static member CancelDefaultToken: unit -> unit static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> static member Choice: computations: Async<'T option> seq -> Async<'T option> static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> ...

--------------------
type Async<'T>
static member Async.RunSynchronously: computation: Async<'T> * ?timeout: int * ?cancellationToken: System.Threading.CancellationToken -> 'T
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
type FormatConfig = { IndentSize: Num MaxLineLength: Num EndOfLine: EndOfLineStyle InsertFinalNewline: bool SpaceBeforeParameter: bool SpaceBeforeLowercaseInvocation: bool SpaceBeforeUppercaseInvocation: bool SpaceBeforeClassConstructor: bool SpaceBeforeMember: bool SpaceBeforeColon: bool ... } member IsStroustrupStyle: bool static member Default: FormatConfig
property FormatConfig.Default: FormatConfig with get
FormatConfig.IndentSize: Num
FormatConfig.MaxLineLength: Num
FormatConfig.InsertFinalNewline: bool
System.Boolean.ToString() : string
System.Boolean.ToString(provider: System.IFormatProvider) : string
FormatConfig.SpaceBeforeParameter: bool
FormatConfig.SpaceBeforeLowercaseInvocation: bool
FormatConfig.SpaceBeforeUppercaseInvocation: bool
FormatConfig.SpaceBeforeClassConstructor: bool
FormatConfig.SpaceBeforeMember: bool
FormatConfig.SpaceBeforeColon: bool
FormatConfig.SpaceAfterComma: bool
FormatConfig.SpaceBeforeSemicolon: bool
FormatConfig.SpaceAfterSemicolon: bool
FormatConfig.SpaceAroundDelimiter: bool
FormatConfig.MaxIfThenShortWidth: Num
FormatConfig.MaxIfThenElseShortWidth: Num
FormatConfig.MaxInfixOperatorExpression: Num
FormatConfig.MaxRecordWidth: Num
FormatConfig.MaxRecordNumberOfItems: Num
type MultilineFormatterType = | CharacterWidth | NumberOfItems static member OfConfigString: cfgString: string -> MultilineFormatterType option static member ToConfigString: cfg: MultilineFormatterType -> string
union case MultilineFormatterType.NumberOfItems: MultilineFormatterType
static member MultilineFormatterType.ToConfigString: cfg: MultilineFormatterType -> string
FormatConfig.RecordMultilineFormatter: MultilineFormatterType
FormatConfig.MaxArrayOrListWidth: Num
FormatConfig.MaxArrayOrListNumberOfItems: Num
FormatConfig.ArrayOrListMultilineFormatter: MultilineFormatterType
FormatConfig.MaxValueBindingWidth: Num
FormatConfig.MaxFunctionBindingWidth: Num
FormatConfig.MaxDotGetExpressionWidth: Num
type MultilineBracketStyle = | Cramped | Aligned | Stroustrup static member OfConfigString: cfgString: string -> MultilineBracketStyle option static member ToConfigString: cfg: MultilineBracketStyle -> string
static member MultilineBracketStyle.ToConfigString: cfg: MultilineBracketStyle -> string
FormatConfig.MultilineBracketStyle: MultilineBracketStyle
union case MultilineBracketStyle.Aligned: MultilineBracketStyle
union case MultilineBracketStyle.Stroustrup: MultilineBracketStyle
FormatConfig.NewlineBeforeMultilineComputationExpression: bool
FormatConfig.NewlineBetweenTypeDefinitionAndMembers: bool
FormatConfig.AlignFunctionSignatureToIndentation: bool
FormatConfig.AlternativeLongMemberDefinitions: bool
FormatConfig.MultiLineLambdaClosingNewline: bool
FormatConfig.BarBeforeDiscriminatedUnionDeclaration: bool
FormatConfig.BlankLinesAroundNestedMultilineExpressions: bool
FormatConfig.KeepMaxNumberOfBlankLines: Num
FormatConfig.ExperimentalElmish: bool

Type something to start searching.