shiki

@vuepress/plugin-shiki

This plugin will enable syntax highlighting for markdown code fence with ShikiOpen in a new window.

prompt

ShikiOpen in a new window is the syntax highlighter being used by VSCode. It has higher fidelity, but it is slower than Prism.jsOpen in a new window.

You could consider disabling this plugin in dev mode to get better development experience.

Usage

npm i -D @vuepress/plugin-shiki@next
import { shikiPlugin } from '@vuepress/plugin-shiki'

export default {
  plugins: [
    shikiPlugin({
      // options
    }),
  ],
}

Options

theme

  • Type: IThemeRegistration

  • Default: 'nord'

  • Details:

    Theme of shiki.

    This option will be forwarded to getHighlighter() method of shiki.

  • Also see:

langs

  • Type: (Lang | ILanguageRegistration)[]

  • Default: []

  • Details:

    Languages of shiki.

    This option will be forwarded to getHighlighter() method of shiki.

    If no languages are provided, shiki will load all available languages automatically.

  • Also see:

last update:
contributor: ahong18s