VS Code Settings Guide
Why autocomplete is off, how workspace settings work, and how to configure VS Code yourself
VS Code is highly configurable, and the labs ship with a specific configuration that might look different from VS Code tutorials you’ve seen elsewhere. This page explains the choices and how to navigate the settings system yourself.
How VS Code settings work
VS Code has two levels of settings:
User settings (global)
Stored in your home directory:
- macOS/Linux:
~/.config/Code/User/settings.json - Windows:
%APPDATA%\Code\User\settings.json
These apply everywhere — every project you open, every file you edit.
Open them via File → Preferences → Settings (or Ctrl+,), then click
the {} icon in the upper right to edit the raw JSON.
Workspace settings (per-project)
Stored in .vscode/settings.json inside the project folder.
These override user settings for files in that workspace only. When you
open a lab folder in VS Code, the lab’s .vscode/settings.json takes effect
automatically — even if it conflicts with your global settings.
This matters for Copilot: even if you have Copilot enabled globally, the
workspace setting "github.copilot.enable": {"*": false} will turn it off
while you’re working in a lab.
How to know which setting is active
Open Settings (Ctrl+,), search for a setting name, and look at the
scope indicator on the left. A colored dot means a workspace setting
is overriding the user setting.
VS Code docs: Settings overview
Why Copilot autocomplete is off
Both of these settings are present in every lab workspace:
"github.copilot.enable": { "*": false },
"github.copilot.editor.enableAutoCompletions": false
Here’s the honest reason.
Copilot short-circuits the thing you’re here to practice
When you’re learning to program, the hard part isn’t typing — it’s building
a mental model of how the language works. That mental model comes from wrestling
with the syntax yourself: writing for (int i = 0;, getting the condition wrong,
fixing it, seeing why it works.
Copilot skips that process. It shows you the answer before you’ve formed the question. That feels helpful, but it’s the same as someone whispering the answer right before you answer a flashcard. You never actually learned the material — you just heard it.
Copilot is often wrong for beginners
Copilot is good at producing plausible-looking code. It’s not good at producing
correct code for learning contexts. It will suggest patterns you haven’t learned
yet, mix up concepts (like == vs .equals()), and occasionally produce code that
compiles but does the wrong thing.
As a beginner, you may not be able to tell the difference between a correct Copilot suggestion and a subtly wrong one. That’s not a criticism — it’s just where you are right now. You need to be able to read code and know whether it’s right. You can’t build that skill if an AI is writing the code for you.
There’s a bigger point about hiring
Employers who ask “can you write code without AI assistance?” are checking for foundational understanding, not nostalgia. They want to know that when AI gives you bad output, you’ll catch it. If you only ever wrote code with autocomplete, you don’t have that filter yet.
Build the fundamentals now. Use AI tools later, with judgment.
The full settings explained
Here’s every setting in the lab workspace and what it does.
{
"editor.formatOnSave": true,
Every time you save a file, VS Code runs the formatter. For Java, this uses
the Red Hat Java formatter (see editor.defaultFormatter below). Consistent
formatting means diffs show only what you actually changed, not whitespace noise.
"editor.tabSize": 4,
"editor.insertSpaces": true,
Java convention is 4-space indentation using spaces, not tab characters. The formatter enforces this automatically on save.
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
Remove trailing spaces on save. Add a newline at the end of every file. Both are part of standard POSIX file format and reduce diff noise.
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic",
VS Code automatically analyzes your code for potential null pointer issues
and keeps its understanding of the build config fresh when build.gradle.kts changes.
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
README files open as rendered HTML instead of raw Markdown text. The lab README has formatted tables and code blocks — this setting makes them readable without extra clicks. You can still edit the raw file via right-click → Open With → Text Editor.
"github.copilot.enable": { "*": false },
"github.copilot.editor.enableAutoCompletions": false,
See Why Copilot is off above.
"gitlens.enabled": false,
GitLens is a popular extension that shows git blame annotations inline in your code (who changed this line and when). It’s useful for collaborative work, but it’s visual noise when you’re new to programming. Disabled here.
"editor.inlayHints.enabled": "off",
Inlay hints show the inferred types of variables inline, like:
var x = 5; // : int
These can be helpful later, but when you’re learning types, you should be declaring them explicitly anyway. Disabled to reduce visual clutter.
"editor.defaultFormatter": "redhat.java",
Use the Red Hat Java Language Server as the formatter (part of vscjava.vscode-java-pack).
This is the standard Java formatter for VS Code and uses the same rules
as IntelliJ IDEA and Eclipse by default.
"editor.wordWrap": "bounded",
"editor.wordWrapColumn": 100
Lines wrap visually at 100 characters. The 80-character limit from the 1970s is outdated — 100 is a reasonable modern default for Java.
Recommended extensions
These are suggested in .vscode/extensions.json. VS Code will prompt you to
install them when you open a lab folder.
vscjava.vscode-java-pack
The core Java extension bundle. Includes:
- Language Support for Java (Red Hat) — syntax highlighting, error detection, autocomplete for your own code, go-to-definition
- Debugger for Java — breakpoints, step through code, inspect variables
- Test Runner for Java — run JUnit tests with a click, see pass/fail inline
- Maven for Java — not needed for this course, but part of the pack
Without this, VS Code is just a text editor for Java.
sandcastle.vscode-open
Adds an “Open in Browser” button for HTML files. Not used in most labs, but useful for any web-related work.
yzhang.markdown-all-in-one
Better Markdown editing:
- Table of contents generation
- Keyboard shortcuts (
Ctrl+Bfor bold,Ctrl+Ifor italic) - Prettier table formatting when editing raw
.mdfiles
streetsidesoftware.code-spell-checker
Spell-checks your code, including:
- Variable names (catches
messgeinstead ofmessage) - String literals (catches typos in output text)
- Comments
It understands camelCase and snake_case, so getBirthYear won’t flag as
an error. Words it doesn’t know show a blue underline — right-click to add
to dictionary or fix.
Extensions that won’t appear as suggestions
The unwantedRecommendations field in .vscode/extensions.json suppresses
these from appearing as workspace recommendations:
- github.copilot and github.copilot-chat — see Copilot section above
- google.gemini-code-assist — same reasons as Copilot
- eamodio.gitlens — suppressed to reduce distraction
These extensions aren’t uninstalled — you can still use them in other projects. They just won’t pop up with an install prompt when you open a lab.
Changing settings yourself
To change a workspace setting
Edit .vscode/settings.json directly. For example, to turn word wrap off:
"editor.wordWrap": "off"
Note: your changes to .vscode/settings.json will show up in git. If you commit
them, you’re changing the lab template for everyone who clones after you.
That’s usually not what you want. Use .gitignore to exclude local changes,
or only change user settings for personal preferences.
To change a user setting (global)
Press Ctrl+, (or Cmd+, on Mac) to open the Settings UI. Use the search box
to find any setting. Click the tab selector to switch between “User” and “Workspace”.
To edit as JSON: click the {} icon in the upper right of the Settings panel.
To turn Copilot back on in a specific project
In that project’s .vscode/settings.json, change:
"github.copilot.enable": { "*": true }
This only affects that workspace.
Further reading
- VS Code Settings docs — official guide to user/workspace/folder settings
- VS Code keybindings — keyboard shortcuts reference
- Java in VS Code — Java-specific features, project management, debugging
- VS Code extensions marketplace — browse extensions (search by name to find the ones listed above)