Search code examples
javaintellij-ideaindentation

IntelliJ indentation avoid using 2 tabs


Something IntelliJ is using 2 tabs to indent code, but I really hate it, but I can't find where I can set this param in the settings.
An example of those cases are the following:

public static void main(String[] args) {
    new Thread(
            () -> {} // as you can see this line of code is indented by 2 tabs
    );
}

Does anyone knows how to change this behavior?


Solution

  • To access the settings, in the Settings/Preferences dialog (Ctrl+Alt+s), go to Editor | Code Style and choose language. You can set the settings you want there.

    enter image description here