java-code-styles icon indicating copy to clipboard operation
java-code-styles copied to clipboard

Support for .editorconfig file format

Open pwittchen opened this issue 7 years ago • 4 comments

Hi,

What do you think about supporting .editorconfig file format? It looks like pretty interesting project and it's independent from the IDE. I suppose, such support would require writing 2 new .editorconfig files basing on config/codestyles/Square.xml and config/codestyles/SquareAndroid.xml.

Reference link: https://editorconfig.org/

By the way: thanks for providing great code styles. I'm using it in all of my java, kotlin and android open-source projects :).

Regards, Piotr

pwittchen avatar Sep 14 '18 14:09 pwittchen

Supporting how? IntelliJ IDEA already recognizes the file if it's present.

JakeWharton avatar Sep 14 '18 14:09 JakeWharton

I mean, if I would like to use .editorconfig for code formatting and use Square code style for Java or Android project, I need to define this code style in .editorconfig file inside my project. By "supporting" I mean providing .editorconfig file with configuration mirroring Square Java/Android code style defined in the Square.xml and SquareAndroid.xml file.

pwittchen avatar Sep 14 '18 14:09 pwittchen

This should be easy. Feel free to send a PR. It's just spaces indent, 2 spaces, trim trailing space, newline at end of file.

JakeWharton avatar Sep 14 '18 14:09 JakeWharton

Android Studio supports exporting Code Style as EditorConfig file.

tomislavhofman avatar May 05 '20 13:05 tomislavhofman