Skip to content

Languages

Bundled Languages

Language grammars listed below are re-distributed via tm-grammars into the shiki package.

?
NameIDAliasPreview

Grammars are covered by their repositories’ respective licenses, which are permissive (apache-2.0, mit, etc), and made available in this NOTICE.

For loading your custom languages, please reference to this guide.

Special Languages

Plain Text

You can set lang to text to bypass highlighting. This is useful as the fallback when you receive user specified language that are not available. For example:

txt
import { codeToHtml } from 'shiki'

const html = codeToHtml('console.log("Hello World")', {
  lang: 'text', // [!code hl]
  theme: 'vitesse-light',
})

txt, plain are provided as aliases to text as well.

ANSI

A special processed language ansi is provided to highlight terminal outputs. For example:

colored foreground
colored background

bold text
dimmed text
underlined text
reversed text
strikethrough text
underlined + strikethrough text

Check the raw markdown of code snippet above.

Released under the MIT License.