Skip to content

Instantly share code, notes, and snippets.

@photizzo
Created June 10, 2019 14:33
Show Gist options
  • Save photizzo/2b21881e7297def877205f538d9f4b5a to your computer and use it in GitHub Desktop.
Save photizzo/2b21881e7297def877205f538d9f4b5a to your computer and use it in GitHub Desktop.
Go to File -> Settings... -> Editor
General -> Auto Import
check Optimize imports on the fly (for current project).
Code Style -> Kotlin
Set from... -> Predefined style -> Kotlin style guide (Kotlin plugin 1.2.20+).
open Code Generation tab
uncheck Line comment at first column;
select Add a space at comment start.
open Imports tab
select Use single name import (all of them);
remove import java.util.* from Packages to Use Import with '*'.
open Blank Lines tab
change Keep Maximum Blank Lines / In declarations & In code to 1 and Before '}' to 0.
(optional but recommended) open Wrapping and Braces tab
uncheck Method declaration parameters / Align when multiline.
(optional but recommended) open Tabs and Indents tab
change Continuation indent to the same value as Indent (4 by default).
Inspections
change Severity level of Unused import directive and Redundant semicolon to ERROR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment