Skip to content
sdocs

VS Code Extension

The sdocs extension brings .sdoc files and the Explorer into VS Code: full Svelte IntelliSense in doc files, sdocs-aware completions and diagnostics, and a Projects view that runs your docs and opens them in an editor tab — no terminal, no browser.

Install

Search for sdocs in the Extensions view, or install from the Visual Studio Marketplace. The Svelte extension is required and installs automatically as a dependency.

What you get

  • Language support.sdoc files run as their own language, served by a bundled language server that gives block bodies full Svelte intelligence (completion, hover, diagnostics, go-to-definition) and fragment-wise formatting, plus block-format completions and the same parser diagnostics the build uses.
  • Projects view — every sdocs project in your workspace as a card, with Run / Open / Stop controls and live status.
  • Docs tabs — the Explorer opens in an editor tab, one per project, with refresh and restart buttons and Cmd+R support.
  • MCP server — the extension registers the sdocs MCP server with the editor, so agent features can validate .sdoc files with the real parser, scaffold starter docs from a component's extracted props, read the authoring guide, and read the workspace itself — the docs map (list_docs), a search across every title, synonym and tag (search_docs), and any component's extracted API (get_component_api). It prefers the workspace's own sdocs install and falls back to npx; the editor starts and stops it on demand.

Scaffolding new docs

Right-click any .svelte file in the explorer (or run sdocs: New Component Doc from the palette) to scaffold a matching .sdoc next to it, pre-filled with the component import and a [SHOWCASE] block wrapping a [COMPONENT]. If the doc already exists, it opens instead.