Skip to Content
Md2Docx logo Md2Docx

ICreateCodeShikiOptions

Updated 10 Nov 2026

Defined in: code-shiki/src/code-shiki.ts:53

Configuration options for the Shiki code highlighting plugin.

Extends

Properties

blockType?

optional blockType?: "table" | "paragraph"

Defined in: code/src/types.ts:126

Block presentation type when lineNumbers is false:

  • "table": renders a padded single-cell table with background shading and border.
  • "paragraph": renders as a native shaded Paragraph.

Default

"table"

Inherited from

ICodeShikiOptions.blockType

customThemes?

optional customThemes?: Record<string, Partial<ICodeTheme>>

Defined in: code/src/types.ts:88

Additional custom themes catalog mapped by name.

Inherited from

ICodeShikiOptions.customThemes

diffHighlight?

optional diffHighlight?: boolean

Defined in: code/src/types.ts:138

Whether to detect and style git diff additions and deletions.

Default

true

Inherited from

ICodeShikiOptions.diffHighlight

fontFamily?

optional fontFamily?: string

Defined in: code/src/types.ts:112

Monospace font family for code blocks and inline code runs.

Default

"Consolas"

Inherited from

ICodeShikiOptions.fontFamily

fontSize?

optional fontSize?: number

Defined in: code/src/types.ts:118

Font size in half-points (e.g. 19 = 9.5pt, 20 = 10pt, 24 = 12pt).

Default

19

Inherited from

ICodeShikiOptions.fontSize

gutterStart?

optional gutterStart?: number

Defined in: code/src/types.ts:100

Starting line number for gutter.

Default

1

Inherited from

ICodeShikiOptions.gutterStart

gutterWidthPercent?

optional gutterWidthPercent?: number

Defined in: code/src/types.ts:106

Width percentage allocated to gutter column when lineNumbers is true. Auto-calculated based on line count if not specified.

Inherited from

ICodeShikiOptions.gutterWidthPercent

highlighter?

optional highlighter?: ShikiHighlighter

Defined in: code-shiki/src/code-shiki.ts:39

Pre-configured Shiki highlighter instance. If omitted, a shared singleton highlighter is automatically managed.

Inherited from

ICodeShikiOptions.highlighter

highlightInline?

optional highlightInline?: boolean

Defined in: code/src/types.ts:132

Whether to intercept and highlight inlineCode MDAST nodes.

Default

true

Inherited from

ICodeShikiOptions.highlightInline

langs?

optional langs?: BundledLanguage[]

Defined in: code-shiki/src/code-shiki.ts:50

Additional languages to preload when auto-initializing Shiki.

Inherited from

ICodeShikiOptions.langs

lineNumbers?

optional lineNumbers?: boolean

Defined in: code/src/types.ts:94

Whether to display line numbers in a gutter column.

Default

false

Inherited from

ICodeShikiOptions.lineNumbers

shikiTheme?

optional shikiTheme?: string

Defined in: code-shiki/src/code-shiki.ts:45

Shiki theme identifier to use during tokenization. Defaults to matching the plugin theme option if string, or "github-light".

Inherited from

ICodeShikiOptions.shikiTheme

tabSize?

optional tabSize?: number

Defined in: code/src/types.ts:144

Number of spaces to replace tab (\t) characters with.

Default

2

Inherited from

ICodeShikiOptions.tabSize

theme?

optional theme?: PresetThemeName | string & object | ICodeTheme

Defined in: code/src/types.ts:83

Active theme name or custom theme object.

Default

"github-light"

Inherited from

ICodeShikiOptions.theme

themes?

optional themes?: BundledTheme[]

Defined in: code-shiki/src/code-shiki.ts:58

Shiki themes to preload during creation.

Default

["github-light", "github-dark", "monokai"]

tokenizer?

optional tokenizer?: (code, language?) => Token[][]

Defined in: code/src/types.ts:149

Optional custom tokenizer override.

Parameters

code

string

language?

string

Returns

Token[][]

Inherited from

ICodeShikiOptions.tokenizer

On this page