Comments (4)
I've noticed this too. I think it's important to fix this. Having the function body "undented" back before the parentheses is deliberately allowed by the F# spec.
from fantomas.
I remember I did this to be consistent with prettyprinting of function
keyword.
Will fix this.
from fantomas.
@dungpa any pointers to where to look in the code to fix this one?
from fantomas.
Take a look at DesugaredLambda
and Lambda
in https://github.com/dungpa/fantomas/blob/master/src/Fantomas/CodePrinter.fs#L374.
Using preserveBreakNln
there causes the problem.
Particularly, fun
blocks have to be indented after their parents which are likely function applications, etc.
It seems this indentation has already been taken care of in https://github.com/dungpa/fantomas/blob/master/src/Fantomas/CodePrinter.fs#L413.
from fantomas.
Related Issues (20)
- Consider documenting why certain config options exist HOT 4
- formatting code samples in markdown files (fsharp blocks) and <code> elements in xml comments? HOT 1
- VS2022: "fsharp_multiline_bracket_style = stroustrup" Not working HOT 5
- Reformatting code with flexible type syntax remove hash symbol
- Newline inconsistency in object expression HOT 7
- Add doc comments in SyntaxNode.fs giving an example of what each node looks like
- Process is reserved keyword
- Unable to format Fable line (cannot determine if Expr Paren Fantomas.Core.SyntaxOak+ExprParenNode is uppercase or lowercase) HOT 2
- Trivia after mutable keyword is missing HOT 1
- Formatting can depend on cursor position HOT 4
- Misplaced comment in "else if" HOT 3
- Fantomas does not support extended interpolated strings HOT 4
- Many Ifdefs seem to cause parse error HOT 1
- Unmatched '{' error when formatting the code HOT 2
- Using `--check` gives error "todo WhileBang" HOT 9
- Breaks shorthand lambda atomicity for lowercase method invocations
- Consider relaxing ASTTransformer treatment of ranges in record fields HOT 1
- Unable to format F# 8 extended interpolated strings with curly braces HOT 3
- Move editor config to library rather than tool HOT 6
- "Incomplete declaration of a static construct" which the F# compiler accepts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fantomas.