fsprojects / fantomas

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

Latest fantomas breaks Falanx indentation #384

Closed 7sharp9 closed 5 years ago

7sharp9 commented 5 years ago

Description

The latest 2.9.1 has incorrect indentation

Repro code

See https://github.com/jet/falanx/issues/84

nojaf commented 5 years ago

Hi @7sharp9, could you give us some more pointers how to solve this. The F# code in https://github.com/jet/falanx/issues/84 is coming from where? Would it be possible to have a smaller reproduction in the online tool?

jindraivanek commented 5 years ago

I think main culprit here is let ... in ... support (https://github.com/fsprojects/fantomas/blob/c5597b7c1b63466a01dea7c6fed750bade9b5f49/src/Fantomas/CodePrinter.fs#L665).

I will try to fix it by disabling let ... in for multiline and when generating from AST.