Skip to content

VS Code Extension ​

The extension brings Scholarly's templates, layouts, components, citations, theme controls, and project checks into VS Code. Its sidebar follows the usual workflow: start, build, customize, then check.

The interface follows the VS Code display language. English and Simplified Chinese are included.

Install ​

Install Slidev Scholarly from the VS Code Marketplace. Requires VS Code 1.106.0 or newer. Preview and export also need Slidev and the theme installed in the presentation project; see Quick start.

Open the extension ​

  1. Open a Markdown file.
  2. Open the Secondary Side Bar.
  3. Select Slidev Scholarly.

The sidebar is ordered by task:

StageViewPurpose
StartStart · TemplatesCreate a deck from a template
BuildBuild · LayoutsInsert a whole-slide structure
BuildBuild · ComponentsInsert theorems, metrics, evidence, and other content
BuildBuild · Citations & AnchorsInsert BibTeX keys, summaries, and internal links
CustomizeCustomize · ThemesSet presets, colors, fonts, and light or dark modes
ReferenceReference · CLI ActionsRun CLI tasks, the doctor, and help
Slidev Scholarly sidebar in VS Code with templates, layouts, components, citations, and theme sections
Keep the sidebar beside your Markdown and work through it from top to bottom.

1. Start a deck ​

Choose a template in Start · Templates to create a complete project through the CLI. Enter a new or empty folder name, then open that folder, install dependencies, and start the preview:

bash
pnpm install
pnpm run dev

The Command Palette action Slidev Scholarly: Create Presentation creates a starter Markdown file instead. It writes to the workspace, or opens an untitled document when no workspace is open. Add the file to a Slidev project before previewing it.

Build an outline with Deck Builder ​

Run Slidev Scholarly: Open Deck Builder, then follow these steps:

  1. Choose a workflow, such as a paper talk or thesis defense.
  2. Check each layout thumbnail, then add or reorder slides.
  3. Select a slide and write its content.

Create an untitled Markdown deck when the outline is ready, or append only the selected slide to the end of the active Markdown file. Appending preserves the existing deck settings and pages. Continue editing and previewing in Slidev.

Citation workflows also need the references.bib file beside the saved Markdown. After generating an outline, choose Create template project in the notification to initialize the complete starter, then save your generated outline into that project. The notification can be dismissed without changing the outline; creating a project refuses to overwrite a nonempty folder.

Switching layouts keeps each slide's draft fields; only the active layout is generated. In narrow editors, expand the workflow, layout, or outline controls when needed. Use arrow keys to choose a workflow, then Tab to move to the editor.

Slidev Scholarly Deck Builder showing workflow choices, a slide outline, and the selected layout content fields
Choose a workflow, understand the layouts, then write the first draft.

2. Build the slides ​

Insert layouts and components ​

Choose a layout or component from the sidebar. Selecting an item inserts its Markdown at the cursor; the eye icon opens a visual preview first. Place whole-slide snippets at a page boundary and check the surrounding --- separators.

Use:

  • Layouts for whole-slide structure;
  • Components for theorems, metrics, evidence, and other content;
  • Citations for BibTeX references and footnotes.

Use completions as you type ​

TriggerSuggestions
layout:Layout names
colorTheme:, fontTheme:Theme values
contentMode:, chromeMode:, sectionMode:Light and dark modes
<Scholarly components
:::Markdown directives
](#, href="#, to="#Internal anchors
ss-, scholarly-Built-in snippets

Press Ctrl+Space if suggestions do not open automatically.

Insert citations and anchors ​

Build · Citations & Anchors lists BibTeX entries and internal anchors from the active document.

Available commands include:

  • Slidev Scholarly: Insert Citation
  • Slidev Scholarly: Insert Internal Anchor
  • Slidev Scholarly: Insert Internal Anchor Reference
  • Slidev Scholarly: Insert Paper Summary

Use snippets ​

Type a prefix and press Tab:

PrefixInserts
ss-coverCover slide
ss-sectionSection divider
ss-figureFigure with caption
ss-theoremTheorem component
ss-resultsResults layout
ss-citeBibTeX citation
ss-anchorInternal anchor
ss-frontmatterScholarly frontmatter

Browse the full catalog from the completion list or sidebar. Legacy scholarly-* prefixes still work.

3. Customize the deck ​

Customize · Themes contains four groups:

  • Presets
  • Color Themes
  • Font Themes
  • Light & Dark Modes

Theme actions update frontmatter in the active Markdown file. They do not rewrite slide content.

Slidev Scholarly color theme picker open in VS Code
Choose a theme in the sidebar or Command Palette. The extension writes the change to frontmatter.

4. Check and get help ​

Reference · CLI Actions groups commands by task:

GroupActions
StartCreate a presentation or list templates
BuildList layouts and components, add snippets, or apply workflows
CustomizeSet a theme or list presets
Check & HelpRun doctor or show CLI help

Citation diagnostics ​

When a deck contains @citekey or !@citekey, the extension checks for:

  • missing bibFile configuration;
  • missing .bib files;
  • duplicate or unresolved keys;
  • a missing layout: references slide.

Quick Fix can repair the common cases.

Troubleshooting ​

Suggestions or snippets do not appear ​

  1. Confirm that the extension is installed and enabled.
  2. Open a .md file.
  3. Press Ctrl+Space.

The sidebar is missing ​

  1. Run View: Toggle Secondary Side Bar.
  2. Run View: Reset View Locations if the view is still missing.

Extension development ​

Install a local VSIX
  1. Download or build the .vsix file.
  2. Open the Command Palette with Cmd+Shift+P or Ctrl+Shift+P.
  3. Run Extensions: Install from VSIX....
  4. Select the file and reload VS Code.
Turn on developer diagnostics

Run Slidev Scholarly: Toggle Dev Mode. The status bar shows Scholarly Dev, and the Slidev Scholarly output channel records timing logs.

Settings:

  • slidevScholarly.devMode.enabled
  • slidevScholarly.devMode.slowThresholdMs (default: 25)

Report bugs and feature requests on GitHub.