daisuzz.log

KotlinのStyle GuideをIntelliJに設定する

Kotlin 公式のStyle GuideIntelliJに設定する方法が簡単だったので書いていきます。

環境

やりかた

Preference -> Editor -> Code Style -> Kotlin を選択し、右上の「Set from…」と書いてある箇所をクリックします。

その後、Predefined style -> Kotlin style guide をクリックすれば設定完了です。

スクリーンショット 2018-07-13 21.33.15.png

Code -> Reformat Code すると、Style Guideに合わせてコードフォーマットされます。

参考

https://kotlinlang.org/docs/reference/coding-conventions.html https://pleiades.io/help/idea/code-style-kotlin.html