-
Notifications
You must be signed in to change notification settings - Fork 81
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
IntelliJ plugin doesn't respect max line length setting. #351
Comments
Definitely interested to see if this is something that would be considered. The discrepancy between IDE and linter is one of the main issues my team has with ktlint (our current style tool). We're considering ktfmt to replace it but I can't convince others to change our max line width to 100 (as required by ktfmt). Spotless gets around this but then we have the issue of the IDE plugin clashing with build script tooling. |
This would be very useful. |
I'm quite confident this is fixed in the latest version. Please reopen if otherwise |
@hick209 I'm not sure how I can make the IntelliJ plugin to respect the max line width setting set by spotless or ktfmt-gradle. |
@mateherber-jt, oh so the issue persist even at 0.50? Interesting... |
As far as I understand from working on the plugin and looking into the ktfmt step for spotless, both use ktfmt as a direct dependency, but configure it in two different locations (IJ settings vs gradle file). I think the easiest way to implement this would be allowing to set that value directly in the config form - if that is something that should be configurable. Not sure how much effort it would require to implement reading the max line length value from an |
I'm running into this same issue. It seems like the Intellij plugin uses 100 for max_line_limit regardless of the |
Fixed in #503 |
Should be fixed by #503 |
The IntelliJ plugin does not provide an option to consume
max_line_length
asFormattingOptions.maxWidth
inUiFormatter
. Thus we cannot synchronize the IDE with the overridden setting in our build script:KtfmtConfigurable.form
should provide an option to respect theHard wrap at
setting inPreferences > Editor > Code Style
ormax_line_length
option in.editorconfig
.The text was updated successfully, but these errors were encountered: