Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Svelte Shiki PreprocessorNew to Visual Studio Code? Get it now.
Svelte Shiki Preprocessor

Svelte Shiki Preprocessor

samplekit

|
65 installs
| (0) | Free
Syntax highlighting for code blocks in Svelte HTML comments.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Syntax Highlighting for Decorated Code Blocks in Svelte Templates

This extension adds syntax highlighting to – and snippets for – the @samplekit/preprocess-shiki NPM package.

The NPM package allows you to write decorated code blocks (via Shiki) directly in Svelte templates without disrupting other tools like svelte-check, Prettier, ESLint, TypeScript, etc.

Examples

Without Extension

Codeblock in HTML comment without extension.

With Extension

Codeblock in HTML comment with extension.

Supported Syntax

The supported syntax matches that of the NPM package's preprocessor.

In Svelte markup, wrap blocks with <!-- shiki-start shiki-end --> and one liners with <!-- shiki-svelte shiki-svelte -->, <!-- shiki-html shiki-html -->, etc.

Links

  • Docs
  • Extension on the VSCode Marketplace
  • Extension Source
  • Companion NPM Package
  • Companion Package Source
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft