Aside from two or four spacing there are many other style options and opinions. Google has shared style guides with the public which can be found at https://github.com/google/styleguide
There is a style guide file for Java for Eclipse and a style guide file for Java for IntelliJ. Other IDEs may be able to import and use either the Eclipse or IntelliJ files.
At work they use the Google Java style guide, which does mean two spaces and not four. However I could go with a different style guide as long as it is clearly defined.
The Google Java Style Guide may have different values for style then the official CodeRanch Style Guide https://javaranch.com/style.jsp
The Google guides may have different values then Sonar or other code quality analysis tools.
Yes, my initial thought was to use the dot editor config to help with style and it may still be able to. However I think that an style XML file may be a better way to go.
The other point about the editor config was regarding plugins and how they may help you out.