Skip to content

Languages

Bundled Languages

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

?
NameIDAliasPreview
ABAP abap
ActionScript
actionscript-3
Ada ada
Angular HTML angular-html
Angular TypeScript angular-ts
Apache Conf apache
Apex apex
APL apl
AppleScript applescript
Ara ara
AsciiDoc asciidocadoc
Assembly asm
Astro
astro
AWK awk
Ballerina ballerina
Batch File batbatch
Beancount beancount
Berry berrybe
BibTeX bibtex
Bicep bicep
Blade blade
1C (Enterprise) bsl1c
C c
Cadence cadencecdc
Cairo cairo
Clarity clarity
Clojure clojureclj
CMake cmake
COBOL cobol
CODEOWNERS codeowners
CodeQL codeqlql
CoffeeScript coffeecoffeescript
Common Lisp common-lisplisp
Coq coq
C++ cppc++
Crystal crystal
C# csharpc#cs
CSS css
CSV csv
CUE cue
Cypher cyphercql
D
d
Dart dart
DAX dax
Desktop
desktop
Diff diff
Dockerfile dockerdockerfile
dotEnv dotenv
Dream Maker dream-maker
Edge edge
Elixir elixir
Elm
elm
Emacs Lisp emacs-lispelisp
ERB erb
Erlang erlangerl
Fennel fennel
Fish fish
Fluent fluentftl
Fortran (Fixed Form) fortran-fixed-formfforf77
Fortran (Free Form) fortran-free-formf90f95f03f08f18
F# fsharpf#fs
GDResource
gdresource
GDScript
gdscript
GDShader
gdshader
Genie genie
Gherkin gherkin
Git Commit Message git-commit
Git Rebase Message git-rebase
Gleam gleam
Glimmer JS glimmer-jsgjs
Glimmer TS glimmer-tsgts
GLSL glsl
Gnuplot gnuplot
Go go
GraphQL graphqlgql
Groovy groovy
Hack hack
Ruby Haml haml
Handlebars handlebarshbs
Haskell
haskellhs
Haxe haxe
HashiCorp HCL hcl
Hjson hjson
HLSL hlsl
HTML html
HTML (Derivative) html-derivative
HTTP http
HXML hxml
Hy hy
Imba imba
INI iniproperties
Java java
JavaScript javascriptjs
Jinja
jinja
Jison jison
JSON json
JSON5 json5
JSON with Comments jsonc
JSON Lines jsonl
Jsonnet jsonnet
JSSM jssmfsl
JSX jsx
Julia juliajl
Kotlin kotlinktkts
Kusto kustokql
LaTeX latex
Lean 4 leanlean4
Less less
Liquid liquid
LLVM IR llvm
Log file log
Logo logo
Lua lua
Luau luau
Makefile makemakefile
Markdown markdownmd
Marko marko
MATLAB matlab
MDC mdc
MDX mdx
Mermaid mermaidmmd
MIPS Assembly mipsasmmips
Mojo mojo
Move move
Narrat Language narratnar
Nextflow nextflownf
Nginx nginx
Nim nim
Nix
nix
nushell nushellnu
Objective-C objective-cobjc
Objective-C++ objective-cpp
OCaml ocaml
Pascal
pascal
Perl perl
PHP php
PL/SQL plsql
Gettext PO popotpotx
Polar polar
PostCSS
postcss
PowerQuery powerquery
PowerShell powershellpsps1
Prisma prisma
Prolog prolog
Protocol Buffer 3 protoprotobuf
Pug pugjade
Puppet
puppet
PureScript purescript
Python pythonpy
QML qml
QML Directory qmldir
Qt Style Sheets qss
R r
Racket
racket
Raku rakuperl6
ASP.NET Razor razor
Windows Registry Script reg
RegExp regexpregex
Rel rel
RISC-V riscv
reStructuredText rst
Ruby rubyrb
Rust rustrs
SAS sas
Sass sass
Scala scala
Scheme scheme
SCSS scss
1C (Query) sdbl1c-query
ShaderLab shaderlabshader
Shell shellscriptbashshshellzsh
Shell Session shellsessionconsole
Smalltalk smalltalk
Solidity solidity
Closure Templates soyclosure-templates
SPARQL sparql
Splunk Query Language splunkspl
SQL sql
SSH Config ssh-config
Stata stata
Stylus
stylusstyl
Svelte
svelte
Swift
swift
SystemVerilog
system-verilog
Systemd Units systemd
TalonScript talonscripttalon
Tasl tasl
Tcl tcl
Templ templ
Terraform terraformtftfvars
TeX tex
TOML toml
TypeScript with Tags ts-tagslit
TSV tsv
TSX tsx
Turtle turtle
Twig
twig
TypeScript typescriptts
TypeSpec typespectsp
Typst typsttyp
V v
Vala vala
Visual Basic vbcmd
Verilog
verilog
VHDL vhdl
Vim Script vimlvimvimscript
Vue
vue
Vue HTML
vue-html
Vue Vine vue-vine
Vyper vypervy
WebAssembly wasm
Wenyan wenyan文言
WGSL wgsl
Wikitext
wikitextmediawikiwiki
WebAssembly Interface Types wit
Wolfram wolframwl
XML xml
XSL xsl
YAML yamlyml
ZenScript zenscript
Zig zig

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.