Work around:
Here's a direct link to the one from before the Feb '14 commit: https://raw.githubusercontent.com/google/styleguide/0249a38579160e135cbd7eb5099898611683200e/eclipse-java-google-style.xml
Answer from WillDeStijl on Stack Overflowvs code - Import google-java-format from Eclipse to VSCode - Stack Overflow
eclipse-java-google-style.xml and intellij-java-google-style.xml are obsolete and should be removed
google-java-format -> Diferences, how to sync with eclipse / stream format
What other style guides are popular other than Google and Oracle?
Could you get the xml profile in your mentioned plugin? If yes, make sure you have installed Java extension first, VSCode can use a specified Eclipse xml profile as it's formatter profile.
You can check the setting java.format.settings.url. When it's specified, the given formatter profile will be used in VSCode Java formatting.
Another way to use it is to trigger command Java: Open Java formatter settings, and it will help you generate a default formatter profile, you can change the content to what you want.
To directly set "Google Java Style" as "Java's format" on VSCode, please:
1.Install "Extension Pack for Java".
e.g: "Extension Pack for Java v0.9.1" + "Language Support for Java(TM) by Red Hat v0.64.1" for "Java1.8".
Making sure COMPILING, RUNNING and DEBUGGING are successful before "Next Step"!
2.Set the default formatter of Java into "RedHat".
2.1Using hotKeyMap to open the Settings of VSCode, e.g: Ctrl/Cmd + ,
( or Click the logo of VSCode "Code" button and choose "Preference" menu and then click "Setting")
2.2Type "javahome" in the "Search settings" space, then click "Edit in settings.json",
2.3Adding the below code into your "settings.json",
"java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/intellij-java-google-style.xml",
"java.format.settings.profile": "GoogleStyle",
"java.format.settings.imports.onDemand": false,
"java.format.settings.imports.regexp": "^[a-z.]*",
"[java]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "redhat.java",
"editor.tabSize": 2
}
2.4Then restart the "VSCode", Using shift + alt/option + f to automatic "Java's format" into "Google Java Style".
END!