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: 8.0.7+13099e465c1c85da6e84451e7eed34c8f0934044Usage
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.
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.
.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
indent_size = 4formatCode
"""
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
"""
"""
indent_size = 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 - 1max_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
max_line_length = 120formatCode
"""
match myValue with
| Some foo -> someLongFunctionNameThatWillTakeFooAndReturnsUnit foo
| None -> printfn "nothing"
"""
"""
max_line_length = 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
insert_final_newline = trueformatCode
"""
let a = 42
"""
"""
insert_final_newline = false
"""
let a = 42fsharp_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
fsharp_space_before_parameter = trueformatCode
"""
let value (a: int) = x
let DumpTrace() = ()
"""
"""
fsharp_space_before_parameter = 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.
Only the name immediately in front of the parenthesis decides whether this setting or fsharp_space_before_uppercase_invocation applies, so a.B.foo (x) follows this one and a.b.Foo(x) follows the other.
Neither applies unless the whole thing being called is a plain dotted name: a call, an index, a receiver that is not a name, or a type application anywhere in it keeps the parenthesis tight, which leaves xs.map(f).filter(g) and unbox<int>(obj) untouched by either setting.
See Formatting chain expressions.
# Default
fsharp_space_before_lowercase_invocation = trueformatCode
"""
value (a, b)
startTimer ()
match x with
| value (a, b) -> ()
"""
"""
fsharp_space_before_lowercase_invocation = 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.
Only the name immediately in front of the parenthesis decides whether this setting or fsharp_space_before_lowercase_invocation applies, so a.b.Foo (x) follows this one and a.B.foo(x) follows the other.
Neither applies unless the whole thing being called is a plain dotted name: a call, an index, a receiver that is not a name, or a type application anywhere in it keeps the parenthesis tight, which leaves a.Foo(x).Bar(y) and X<Y>.Foo(x) untouched by either setting.
See Formatting chain expressions.
# Default
fsharp_space_before_uppercase_invocation = falseformatCode
"""
Value(a, b)
person.ToString()
match x with
| Value(a, b) -> ()
"""
"""
fsharp_space_before_uppercase_invocation = 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
fsharp_space_before_class_constructor = falseformatCode
"""
type Person() =
class
end
"""
"""
fsharp_space_before_class_constructor = true
"""
type Person () = class endfsharp_space_before_member
Add a space after a member name and before the opening parenthesis of the first parameter.
# Default
fsharp_space_before_member = falseformatCode
"""
type Person() =
member this.Walk(distance: int) = ()
member this.Sleep() = ignore
member __.singAlong() = ()
member __.swim(duration: TimeSpan) = ()
"""
"""
fsharp_space_before_member = 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
fsharp_space_before_colon = falseformatCode
"""
type Point = { x: int; y: int }
let myValue: int = 42
let update (msg: Msg) (model: Model) : Model = model
"""
"""
fsharp_space_before_colon = true
"""
type Point = { x : int; y : int }
let myValue : int = 42
let update (msg : Msg) (model : Model) : Model = modelfsharp_space_after_comma
Adds a space after , in tuples.
# Default
fsharp_space_after_comma = trueformatCode
"""
myValue.SomeFunction(foo, bar, somethingElse)
(a, b, c)
"""
"""
fsharp_space_after_comma = false
"""
myValue.SomeFunction(foo,bar,somethingElse)
(a,b,c)fsharp_space_before_semicolon
Adds a space before ; in records, arrays, lists, etc.
# Default
fsharp_space_before_semicolon = falseformatCode
"""
let a = [ 1 ; 2 ; 3 ]
let b = [| foo ; bar |]
type C = { X: int ; Y: int }
"""
"""
fsharp_space_before_semicolon = 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
fsharp_space_after_semicolon = trueformatCode
"""
let a = [ 1; 2; 3 ]
let b = [| foo; bar |]
type C = { X: int; Y: int }
"""
"""
fsharp_space_after_semicolon = 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
fsharp_space_around_delimiter = trueformatCode
"""
let a = [ 1;2;3 ]
let b = [| 4;5;6 |]
"""
"""
fsharp_space_around_delimiter = 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
fsharp_max_if_then_short_width = 0formatCode
"""
if a then
()
"""
"""
fsharp_max_if_then_short_width = 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
fsharp_max_if_then_else_short_width = 60formatCode
"""
if myCheck then truth else bogus
"""
"""
fsharp_max_if_then_else_short_width = 10
"""
if myCheck then
truth
else
bogusfsharp_max_infix_operator_expression
Control the maximum length for which infix expression can be on one line.
# Default
fsharp_max_infix_operator_expression = 80formatCode
"""
let WebApp =
route "/ping" >=> authorized >=> text "pong"
"""
"""
fsharp_max_infix_operator_expression = 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
fsharp_max_record_width = 40formatCode
"""
type MyRecord = { X: int; Y: int; Length: int }
let myInstance = { X = 10; Y = 20; Length = 90 }
"""
"""
fsharp_max_record_width = 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
fsharp_max_record_number_of_items = 1formatCode
"""
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 = number_of_items
fsharp_max_record_number_of_items = 2
"""
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
fsharp_record_multiline_formatter = character_widthformatCode
"""
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_record_multiline_formatter = number_of_items
"""
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
fsharp_max_array_or_list_width = 80formatCode
"""
let myArray = [| one; two; three |]
"""
"""
fsharp_max_array_or_list_width = 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
fsharp_max_array_or_list_number_of_items = 1formatCode
"""
let myList = [ one; two ]
let myArray = [| one; two; three |]
"""
"""
fsharp_array_or_list_multiline_formatter = number_of_items
fsharp_max_array_or_list_number_of_items = 2
"""
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
fsharp_array_or_list_multiline_formatter = character_widthformatCode
"""
let myArray = [| one; two; three |]
"""
"""
fsharp_array_or_list_multiline_formatter = number_of_items
"""
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
fsharp_max_value_binding_width = 80formatCode
"""
let title = "Great title of project"
type MyType() =
member this.HelpText = "Some help text"
"""
"""
fsharp_max_value_binding_width = 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
fsharp_max_function_binding_width = 40formatCode
"""
let printScore score total = printfn "%i / %i" score total
type Triangle() =
member this.CalculateSurface(width: int, height: int) = width * height / 2
"""
"""
fsharp_max_function_binding_width = 10
"""
let printScore score total =
printfn "%i / %i" score total
type Triangle() =
member this.CalculateSurface(width: int, height: int) =
width * height / 2fsharp_multiline_bracket_style
Cramped Alternative way in F# to format brackets.
Aligned The default 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
fsharp_multiline_bracket_style = alignedformatCode
"""
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_multiline_bracket_style = 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) |]
"""
"""
fsharp_multiline_bracket_style = 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
fsharp_newline_before_multiline_computation_expression = trueformatCode
"""
let something =
task {
let! thing = otherThing ()
return 5
}
"""
"""
fsharp_newline_before_multiline_computation_expression = 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
fsharp_newline_between_type_definition_and_members = trueformatCode
"""
type Range =
{ From: float
To: float }
member this.Length = this.To - this.From
"""
"""
fsharp_newline_between_type_definition_and_members = false
"""
type Range =
{
From: float
To: float
}
member this.Length = this.To - this.Fromfsharp_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
fsharp_align_function_signature_to_indentation = falseformatCode
"""
[<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_align_function_signature_to_indentation = 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 reqfsharp_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
fsharp_alternative_long_member_definitions = falseformatCode
"""
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_alternative_long_member_definitions = 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
fsharp_multi_line_lambda_closing_newline = falseformatCode
"""
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_multi_line_lambda_closing_newline = 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 experimental and is subject to change.
# Default
fsharp_experimental_keep_indent_in_branch = falseformatCode
"""
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_experimental_keep_indent_in_branch = 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
0fsharp_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
fsharp_bar_before_discriminated_union_declaration = falseformatCode
"""
type MyDU = Short of int
"""
"""
fsharp_bar_before_discriminated_union_declaration = true
"""
type MyDU = | Short of intOther
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
fsharp_blank_lines_around_nested_multiline_expressions = trueformatCode
"""
let topLevelFunction () =
printfn "Something to print"
try
nothing ()
with
| ex ->
splash ()
()
let secondTopLevelFunction () =
// ...
()
"""
"""
fsharp_blank_lines_around_nested_multiline_expressions = 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
fsharp_keep_max_number_of_blank_lines = 100formatCode
"""
open Foo
let x = 42
"""
"""
fsharp_keep_max_number_of_blank_lines = 1
"""
open Foo
let x = 42fsharp_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
fsharp_experimental_elmish = falseformatCode
"""
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}" ]
]
]
"""
"""
fsharp_experimental_elmish = 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}" ]
]
]from Fantomas
val string: value: 'T -> string
--------------------
type string = String
(+0 other overloads)
String.Split( separator: char array) : string array
(+0 other overloads)
String.Split(separator: string array, options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: string, ?options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: char array, options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: char array, count: int) : string array
(+0 other overloads)
String.Split(separator: Text.Rune, ?options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: char, ?options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: string array, count: int, options: StringSplitOptions) : string array
(+0 other overloads)
String.Split(separator: string, count: int, ?options: StringSplitOptions) : string array
(+0 other overloads)
type StringSplitOptions =
Literal>]
| None = 0
Literal>]
| RemoveEmptyEntries = 1
Literal>]
| TrimEntries = 2
type Array =
interface ICollection
interface IEnumerable
interface IList
interface IStructuralComparable
interface IStructuralEquatable
interface ICloneable
member Clone: unit -> obj
member CopyTo: array: Array * index: int -> unit + 1 overload
member GetEnumerator: unit -> IEnumerator
member GetLength: dimension: int -> int
...
returns: The total number of elements in all the dimensions of the Array; zero if there are no elements in the array.
property Array.Length: int with get
fallbackConfig: FormatConfig ->
editorConfigProperties: Collections.Generic.IReadOnlyDictionary<string,string> ->
FormatConfig * EditorConfigProblem list
{
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
static member FormatASTAsync: ast: ParsedInput -> Async<string> + 3 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 GetWriterEventsAsync: isSignature: bool * source: string -> Async<WriterEvent array> + 2 overloads
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>
...
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
module Async
from Fantomas.Core
--------------------
type Async =
static member AsBeginEnd:
computation: ('Arg -> Async<'T>) ->
('Arg * AsyncCallback * objnull -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate and 'Del: not null)
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 * objnull -> 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>
computation: Async<'T> *
?timeout: int *
?cancellationToken: Threading.CancellationToken ->
'T
Boolean.ToString(provider: IFormatProvider) : string
| CharacterWidth
| NumberOfItems
static member OfConfigString:
cfgString: string ->
MultilineFormatterType option
static member ToConfigString: cfg: MultilineFormatterType -> string
cfg: MultilineFormatterType ->
string
| Cramped
| Aligned
| Stroustrup
static member OfConfigString:
cfgString: string ->
MultilineBracketStyle option
static member ToConfigString: cfg: MultilineBracketStyle -> string
cfg: MultilineBracketStyle ->
string
fantomas