An extension that surfaces diagnostics from Mago (PHP analyzer) directly in VS Code with fast, workspace-wide analysis and inline quick fixes.
Features
Workspace-wide analysis on startup, on save, or on type (configurable)
Vendor diagnostics filtered by default (still analyzed for symbol resolution)
Auto-discovery of vendor/bin/mago; optional explicit mago.path
Precise squiggles using byte-offset spans from Mago JSON
Quick Fixes for Mago suggestions (insert operations) with safety gating
Status bar indicator and detailed Output channel logs
Performance diagnostics (elapsed ms, issue count)
Aggressive re-run: cancels in-flight analysis on new saves/changes
Commands
Mago: Analyze Workspace (mago.analyzeWorkspace)
Mago: Analyze Current File (mago.analyzeFile) [internally triggers workspace analysis]
Default Behavior
On startup: runs workspace analysis once VS Code finishes loading
On save (default): runs workspace analysis; can switch to on type or manual
Vendor reporting: diagnostics from vendor/ and vendor-bin/ are hidden from Problems by default (unless configured later via mago.toml); vendor is still analyzed internally for resolution
If mago.toml exists at the workspace root, we let Mago discover paths (we don’t pass the workspace path to the CLI); otherwise we pass the workspace folder path
Settings (partial)
mago.path: absolute path to the Mago binary (optional)
mago.runOn: save | type | manual (default: save)
mago.debounceMs: debounce for on-type (default: 400)
mago.reporting.format: Mago reporting format (default: json)