Forked from #53747.
We could automatically configure IntelliJ to use the Eclipse formatter and our bundled format config. The downside of this is that it relies on the "Eclipse Code Formatter" plugin, though I also noticed a thing in IntelliJ about "Required Plugins", under "Build, Execution, Deployment". I tried adding the Eclipse plugin, and it created the file .idea/externalDependencies.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalDependencies">
<plugin id="EclipseCodeFormatter" />
</component>
</project>
Configuring the plugin created: .idea/eclipseCodeFormatter.xml with contents:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EclipseCodeFormatterProjectSettings">
<option name="projectSpecificProfile">
<ProjectSpecificProfile>
<option name="formatter" value="ECLIPSE" />
<option name="pathToConfigFileJava" value="$PROJECT_DIR$/.eclipseformat.xml" />
<option name="selectedJavaProfile" value="Elasticsearch" />
</ProjectSpecificProfile>
</option>
</component>
</project>
It's also referenced in .idea/workspace.xml:
<project>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="EclipseFormatter" />
Forked from #53747.
We could automatically configure IntelliJ to use the Eclipse formatter and our bundled format config. The downside of this is that it relies on the "Eclipse Code Formatter" plugin, though I also noticed a thing in IntelliJ about "Required Plugins", under "Build, Execution, Deployment". I tried adding the Eclipse plugin, and it created the file
.idea/externalDependencies.xmlwith the following content:Configuring the plugin created:
.idea/eclipseCodeFormatter.xmlwith contents:It's also referenced in
.idea/workspace.xml: