LoginSignup
18
12

More than 5 years have passed since last update.

Kotlin Style GuideをIntelliJに設定する

Last updated at Posted at 2018-07-13

概要

Kotlin 公式のStyle GuideをIntelliJに設定する方法が簡単だったので書いていきます。
リンク先にも英語で設定方法が書いてあるので、最新の情報はリンク先を参照してください。

環境

  • macOS High Sierra 10.13.5
  • IntelliJ IDEA ULTIMATE 2018.1

やりかた

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

18
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18
12