06

Lesson 6 of 12

Setting Up VS Code

Install VS Code, enable the `code .` command, and add the extensions you'll use every day.

~8 min·Mac
06 / 12Setting Up VS Code

Step 1: Install VS Code

brew install --cask visual-studio-code

Open VS Code from your Applications folder or Spotlight (⌘ + Space → "Visual Studio Code").

Step 2: Enable the code . command

VS Code can't be opened from the terminal by default — you need to add the code command to your PATH:

  1. Open VS Code
  2. Press ⌘ + Shift + P to open the Command Palette
  3. Type Shell Command and select Shell Command: Install 'code' command in PATH
  4. Restart Ghostty

Test it:

code --version

Now anytime you're in a project folder, just run code . to open it in VS Code.

Step 3: Install essential extensions

Open VS Code and press ⌘ + Shift + X to open the Extensions panel. Search for and install these:

ExtensionWhy
Claude CodeThe official Claude Code extension — inline diffs, plan review, AI chat
BiomeFast formatter and linter for JS/TS — replaces Prettier + ESLint
GitLensSupercharges Git in VS Code — see who changed what, line history, etc.
Error LensShows errors and warnings inline next to the code
Tailwind CSS IntelliSenseAutocomplete for Tailwind classes
MDXSyntax highlighting for .mdx files
DotENVSyntax highlighting for .env files

Or install them all from the terminal at once:

code --install-extension biomejs.biome
code --install-extension eamodio.gitlens
code --install-extension usernamehw.errorlens
code --install-extension bradlc.vscode-tailwindcss
code --install-extension unifiedjs.vscode-mdx
code --install-extension mikestead.dotenv

Configure Biome to format on save

After installing Biome, add this to your VS Code settings (⌘ + Shift + P → "Open User Settings JSON"):

{
  "[javascript][typescript][typescriptreact][javascriptreact]": {
    "editor.defaultFormatter": "biomejs.biome",
    "editor.formatOnSave": true
  }
}

Now your code auto-formats every time you save.

Step 4: Add a useful alias

Add a shortcut to open the current folder in VS Code:

cat >> ~/.zshrc << 'EOF'
alias c='code .'
EOF
source ~/.zshrc

Now c opens the current folder in VS Code.

Your editor workflow

Here's what using VS Code feels like day-to-day:

  1. Open Ghostty
  2. Navigate to your project: ghdev && cd my-project
  3. Open VS Code: c (or code .)
  4. Make changes in VS Code
  5. Run commands (git, bun) in the Ghostty terminal alongside VS Code

In the next lesson we'll install Claude Code — the AI that lives in your terminal.

Knowledge Check

Answer all questions to mark this lesson complete.

Q1What does `code .` do?

Q2Why is Biome a recommended VS Code extension?