Skip to content

Expressive Code compatibility

The Expressive Code Twinkleplop plugin replaces Shiki with Twinkleplop to highlight the syntax of code blocks. All other Expressive Code features keep working, so existing code blocks do not need any changes.

Themes, frames, text markers, word wrap, and plugins work the same way with the Twinkleplop plugin.

The plugin aims to match the colors Shiki uses with the same theme as closely as possible, but some token colors may differ.

The shiki option of Expressive Code configures Shiki, which is disabled with shiki: false when using the Expressive Code Twinkleplop plugin. Use the following equivalents instead:

Other Shiki options, like shiki.transformers, are not supported by the Expressive Code Twinkleplop plugin.

The Expressive Code Twinkleplop plugin only uses Twinkleplop to find tokens to highlight within code blocks. Features described in the Twinkleplop documentation, like themes, render options, or directives, are not used. Directives written in code comments are rendered as regular comments.