3 ms·
I use pre-commit/pre-push hooks to apply formatters like Spotless/ktfmt etc, it's too much work to try to fight Intellij's formatting. There's a ktfmt IntelliJ
by gavinray 4y ago
I use pre-commit/pre-push hooks to apply formatters like Spotless/ktfmt etc, it's too much work to try to fight Intellij's formatting.
There's a ktfmt IntelliJ plugin that does work most of the time IME, if you're willing to give it a shot.
- BoorishBears 4y agoMy auto-generated config has been pretty solid The only time the pre-push hook fails is if a line is too long and there's no "canonical" way to fix it (so it'll create a method chain for example, but it won't do string concatenation since there's N ways to break a string across lines)