shiki
This plugin will enable syntax highlighting for markdown code fence with Shiki.
TIP
Shiki is the syntax highlighter being used by VSCode. It has higher fidelity, but it is slower than Prism.js.
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: