Indent set to 4 spaces, "Reformat code", changes it to 2

Answered

Hi

All my settings have indents set to 4 spaces.

At the bottom of the screen it even says 4 spaces, yet when I do reformat code, it changes all the indents to 2 spaces.
When I do "Auto-indent lines", it doesn't change it from 4 to 2 spaces (neither does that change from 2 tot 4)

This is a very new install of InteliJ IDEA ultimate on Ubuntu 18.04

0
3 comments

Did you install any third-party plug-ins like Eclipse Code Formatter?

Is there any .editorconfig file in the project? It will override IntelliJ IDEA formatting preferences, you can disable this behavior here:

0

I have the same issue, but inverted: have set tabs indentation to 2 spaces everywhere and yet Webstorm keeps adding 4 spaces. I don't have EditorConfig enabled.

1

Please file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with a sample project / code style and the steps to reproduce.

0

Please sign in to leave a comment.