book/vscode-ext/README.md
The MLSysBook extension provides editor-first workflows for building, debugging, and validating the book without leaving VS Code.
The editor runs one copy of the extension. Reload only reloads that copy. If that copy isn’t from this repo, you won’t see new changes (e.g. Reset Quarto config) until you point the editor at this repo’s extension.
Option A – Run from repo (recommended when developing)
mlsysbook-vols) in Cursor/VS Code.npm run compile in book/vscode-ext (or run it from the repo root: cd book/vscode-ext && npm run compile).book/vscode-ext. Use that window for the book (Reset, Build, etc.).Option B – Install from this folder
mlsysbook-vols/book/vscode-ext.npm run compile in book/vscode-ext, then Developer: Reload Window. No need to install again unless you remove the extension.This extension treats ./book/binder as the operational backend.
binder validate ....binder maintain ....The extension separates daily work from configuration:
This keeps daily actions focused while preserving easy access to tuning controls.
--json) from Binder validation../book/binder build html <chapter> / ./book/binder build pdf <chapter>./book/binder debug <pdf|html|epub> --vol1|--vol2./book/binder validate all./book/binder maintain repo-healthBuild All Chapters (Parallel) in the Debug view runs each chapter in a separate git worktree so multiple builds run at once. You choose volume (Vol I / Vol II) and format (PDF, HTML, or EPUB).
Requirements:
book/ (e.g. mlsysbook-vols), not a subfolder like book/ or book/quarto/. The extension needs book/binder to be present to register commands and run parallel jobs.git worktree add --detach; ensure git is available in the environment where the extension runs.mlsysbook.parallelDebugWorkers — number of concurrent builds (default: 4).mlsysbook.parallelDebugRoot — directory for worktrees under repo root (default: .mlsysbook/worktrees).mlsysbook.keepFailedWorktrees — keep worktrees for failed chapters for inspection (default: true).If worktree creation fails, check the MLSysBook Parallel Debug output channel; the first failure will include a tip about repo root and git.
The extension includes QMD-focused visual highlighting to improve scanability in long Quarto documents.
Recommended baseline:
mlsysbook.enableQmdChunkHighlight = truemlsysbook.qmdVisualPreset = balancedmlsysbook.highlightInlineReferences = truemlsysbook.highlightLabelDefinitions = truemlsysbook.highlightDivFenceMarkers = trueWhat gets emphasized:
@fig-..., @tbl-..., @sec-...{#fig-...} and #| label: ...::: / ::::) and region blocks (callouts/divs/code fences)