-
Notifications
You must be signed in to change notification settings - Fork 210
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
[Feature request] Formatter selection / formatting options #303
Comments
@dr-eme is https://github.com/pinterest/ktlint what you are after? |
|
@stenzengel See: kotlin-language-server/server/src/main/kotlin/org/javacs/kt/formatting/Formatter.kt Lines 11 to 15 in 705b4e9
... and, in the original initializer in val blockIndent: Int = 2,
val continuationIndent: Int = 4, PS: If this plugin wants to be opinionated in formatting configurations, its best shot might be to stick with the official style guide, which has been added in /** A format that attempts to reflect https://kotlinlang.org/docs/coding-conventions.html. */
@JvmField
val KOTLINLANG_FORMAT = FormattingOptions(style = GOOGLE, blockIndent = 4, continuationIndent = 4) ... and if we follow this path, there is currently a workaround to configure the formatter in a per-project basis if you're using VSCode: Custom Local Formatters. |
It's ideal if we can choose |
Motivation
We use ktfmt (aka google java style) formatting, and it would be great if to have different formatters options, or at least a way to configure the default one, for instance the default indentation.
Description
Be able to select formatters (e.g. see the ones supported by spotless)
Alternatives considered
Configure formatting options
The text was updated successfully, but these errors were encountered: