895 B
895 B
Code Style
Configure Java Style for IntelliJ
First, download the style configuration.
curl https://raw.githubusercontent.com/google/styleguide/gh-pages/intellij-java-google-style.xml -o ~/Downloads/intellij-java-google-style.xml
Install it in IntelliJ:
- Go to
Preferences > Editor > Code Style - Press the little cog:
Import Scheme > IntelliJ IDEA code style XML- Select the file we just downloaded
- Select
GoogleStylein the drop down - Change default
Hard wrap atinWrapping and Bracestab to 150. - We prefer
import foo.bar.ClassNameoverimport foo.bar.*. Even in cases where we import multiple classes from the same package. This can be set by going toPreferences > Code Style > Java > Importsand changingClass count to use import with '*'to 9999 and `Names count to use static import with '*' to 9999. - You're done!