Interface PrismJSTerminalOpts

Options for the highlighting functions

Hierarchy

  • PrismJSTerminalOpts

Properties

language?: string

The language of the supplied code to highlight. Defaults to tsx if no filename is provided, or else tries to infer the language from the filename. You must have previously called loadLanguages([...]) from PrismJS in order to highlight a given language, if you want something that is not automatically included when tsx and typescript are included.

Default

'tsx'
lineNumbers?: boolean

Whether or not to prepend a line number to each line.

Default

false
maxWidth?: number

The maximum width to make the block on the screen.

Default

process.stdout.columns or 80.

minWidth?: number

The minimum width to make the block on the screen.

Default

0
padding?: number

How many spaces to horizontally pad the code block.

Default

1
theme?: Theme | "xonokai" | "debug" | "moria" | "github" | "prismDark" | "plain"

The theme to use. Either a Theme object, or a string identifying one of the built-in themes.

Default

'moria'

Generated using TypeDoc