Skip to main content

Quick Fix

When a missing-env-key diagnostic appears on a process.env.KEY reference, the Quick Fix lightbulb gives you two instant remediation actions.

Triggering Quick Fix

  1. Place your cursor on any underlined process.env.KEY reference
  2. Click the lightbulb 💡 icon that appears, or press Ctrl+. / Cmd+.

Available Actions

Add KEY to .env

Adds the missing key to your active .env file. You'll be prompted for a value. After saving, the diagnostic clears immediately.

Ignore KEY (mark as built-in)

Suppresses the diagnostic for this key permanently. The key is added to a per-workspace suppression list stored in VS Code's extension state. No file is modified.

This is useful for keys that are injected by the runtime (e.g. keys set in Vercel environment settings that you don't want in your local .env).

Why This Matters

Without Quick Fix, the workflow is: notice the squiggly → open the sidebar → find the add button → type the key. With Quick Fix, you add the missing variable in one keyboard shortcut without leaving the file you're editing.