fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
764 stars 190 forks source link

[max_line_length] does not work #2911

Closed xperiandri closed 1 year ago

xperiandri commented 1 year ago

Issue created from fantomas-online

Code

[<AutoOpen>]
module AppConfigurationKeyValues =

    let resourceType = ResourceType ("Microsoft.AppConfiguration/configurationStores/keyValues", "2023-03-01")

Result

[<AutoOpen>]
module AppConfigurationKeyValues =

    let resourceType =
        ResourceType("Microsoft.AppConfiguration/configurationStores/keyValues", "2023-03-01")

Problem description

Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.

Extra information

Options

Fantomas v6.1 branch at 1/1/1990

    { config with
                MaxLineLength = 140 }

Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.

dawedawe commented 1 year ago

Hey @xperiandri, I think what you want to use here is https://fsprojects.github.io/fantomas/docs/end-users/Configuration.html#fsharp_max_value_binding_width Could you check if that works for you? It does in the online tool.

nojaf commented 1 year ago

I'm going to close this one, as there is nothing actionable left.

xperiandri commented 1 year ago

Works, thanks