0

[vscode docs] Run Java extension in lightweight mode to avoid errors

Update the instructions to avoid getting many errors from the extension.

Bug: None
Change-Id: I1ccb1431f83666ef91958acc81b87d60f67d58a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3247794
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Cr-Commit-Position: refs/heads/main@{#935687}
This commit is contained in:
Victor Hugo Vianna Silva
2021-10-28 00:32:32 +00:00
committed by Chromium LUCI CQ
parent bd4a8c8c83
commit c37c9b79aa

@ -163,10 +163,20 @@ marketplace](https://marketplace.visualstudio.com/search?target=VSCode&category=
the line. the line.
### Java/Android Support ### Java/Android Support
To get Java support in VS Code, you'll need to install the
'Java Extension Pack' extension, but you'll want to immediately uninstall or *Before anything*, add these to your settings.json.
disable the Maven for Java extension so it stops nagging you as we won't need ```
it. // LightWeight is the language support, the feature we care about. The other
// modes include build functionality with Maven and Gradle. They try to build
// on their own and end up showing thousands of errors.
"java.server.launchMode": "LightWeight",
// Avoids overwriting the custom .classpath file (c.f. next section).
"java.configuration.updateBuildConfiguration": "disabled",
```
Then install the "Language Support for Java" extension. If you installed it
before setting the configs above, uninstall, delete the <project> folder (c.f.
next section) and reinstall. You also don't need any of the remaining extensions
in "Extension Pack for Java".
#### Setting up code completion/reference finding/etc. #### Setting up code completion/reference finding/etc.
You'll need to generate a placeholder .classpath file and locate it. In order You'll need to generate a placeholder .classpath file and locate it. In order