I have a JSX file with two-space indents, but IntelliJ keeps adding four-space indents. Changing Settings>Editor>Code Style
for Javascript, HTML, and "other file types" does not seem to affect this.
How can I change the code style for JSX files?
Turns out the reason the IDE wasn't responding to my settings changes is it was using EditorConfig mode (Settings>Editor>Code Style>EditorConfig
). Editing the .editorconfig
file to have the line indent_size = 2
fixed the issue.