-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add separate CodeFormatter.FormatDocumentAsync overloads with cursor and config #2763
Add separate CodeFormatter.FormatDocumentAsync overloads with cursor and config #2763
Conversation
src/Fantomas.Core/CodeFormatter.fsi
Outdated
/// <param name="cursor">The location of a cursor, zero-based.</param> | ||
static member FormatDocumentAsync: | ||
isSignature: bool * source: string * ?config: FormatConfig * ?cursor: pos -> Async<FormatResult> | ||
isSignature: bool * source: string * cursor: pos -> Async<FormatResult> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overload seems excessive and I don't see it being used in practice.
If you want to use this then you should use the next one and pass the default config.
Please remove it.
CHANGELOG.md
Outdated
@@ -1,5 +1,10 @@ | |||
# Changelog | |||
|
|||
## [Unreleased] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was no way you could have known this but for the non-main branch, I prefer that you don't add a changelog entry. This makes rebasing the v6 branch with the main branch easier. (fewer conflicts).
config, | ||
?cursor = cursor | ||
) | ||
match cursor with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you swap the order, please?
In this case, I prefer to have the shortest case first.
6d8e95d
to
b990f9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
#2749 (comment)