|
| 1 | +{ |
| 2 | + // formatOnType and formatOnPaste is a very bad idea for slow formatters |
| 3 | + // (such as an external Google Java Format invocation exec), so just on Save: |
| 4 | + "editor.formatOnSave": true, |
| 5 | + "editor.formatOnType": false, |
| 6 | + "editor.formatOnPaste": false, |
| 7 | + |
| 8 | + "files.insertFinalNewline": true, |
| 9 | + "files.trimTrailingWhitespace": true, |
| 10 | + |
| 11 | + "[java]": { |
| 12 | + "editor.tabSize": 2, |
| 13 | + // Format Java using https://github.com/google/google-java-format, |
| 14 | + // via https://github.com/JoseVSeb/google-java-format-for-vs-code |
| 15 | + "editor.defaultFormatter": "josevseb.google-java-format-for-vs-code", |
| 16 | + "editor.codeActionsOnSave": { |
| 17 | + // Used by at least JS as well as Java, so only overridden for [java] |
| 18 | + "source.organizeImports": "always", |
| 19 | + "source.addMissingImports": "never" |
| 20 | + } |
| 21 | + }, |
| 22 | + // Keep this version in sync with the same version in pom.xml |
| 23 | + // NB: Changes to this are only taken into account on start-up, so need to restart. |
| 24 | + "java.format.settings.google.version": "1.27.0", |
| 25 | + // TODO https://github.com/eclipse-jdtls/eclipse.jdt.ls/issues/3050 |
| 26 | + "java.compile.nullAnalysis.mode": "automatic", |
| 27 | + "java.completion.importOrder": ["#", "", "javax", "java"], //# is static |
| 28 | + "java.completion.favoriteStaticMembers": ["com.google.common.truth.Truth.*"], |
| 29 | + "java.configuration.updateBuildConfiguration": "automatic", |
| 30 | + "java.import.maven.enabled": true |
| 31 | +} |
0 commit comments