-
Notifications
You must be signed in to change notification settings - Fork 38.4k
IntelliJ IDEA Editor Settings
Rossen Stoyanchev edited this page Oct 27, 2017
·
3 revisions
This page describes the noticeable changes made to the default code formatting settings in Intellij IDEA. This is also a chance to review some of these changes to validate or tweak them if necessary:
These are the reported issues that we still discuss (or simply things that the formatter does not support). The first is what we use.
- Space in annotation parameter assignment:
@Foo(name="foo")
vs.@Foo(name = "foo")
- Space in annotation array parameter:
@Target({ ElementType.METHOD, ElementType.TYPE })
vs.@Target({ElementType.METHOD, ElementType.TYPE})
- Default indent option to use tab character instead of space
- Use tab character
- Add a space before the left brace of an array initializer
- Keep when reformating: multiple expressions in one line, simple blocks in one line, simple classes in one line
-
else
,catch
andfinally
on new line - Method declaration parameters: do not align when multiline
- Keep one space before } (solely use to keep the space between the end of the last method and the end of the class)
- Minimum blank line after class header 0 (instead of 1)
- Disabled
- Class count to trigger static import to 50 (to prevent
import org.foo.*;
instead of listing the classes oforg.foo
) - Changed the import sequence to import in the following order:
static imports
,java.*
,javax.*
, others,org.springframework.*
. Each sequence is separated by a space