Languages

102 languages ship built-in and load lazily — only the languages you highlight are bundled and parsed.

javascript (js), typescript (ts), jsx, tsx, html, css, python, json, bash (sh), sql, yaml, markdown (md), java, go, rust (rs), php, ruby (rb), c, cpp, csharp (cs), swift, kotlin, toml, xml, dockerfile, diff.

All languages

actions, ada, apache, asciidoc, assembly, astro, bash, batch, c, clojure, cmake, coffeescript, cpp, crystal, csharp, css, csv, d, dart, diff, dockerfile, ejs, elixir, elm, env, erlang, fish, fortran, fsharp, gitconfig, gleam, go, graphql, groovy, haml, handlebars, haskell, hcl, html, http, ini, java, javascript, jinja, json, jsx, julia, kotlin, kubernetes, latex, less, liquid, lisp, lua, makefile, markdown, matlab, nginx, nim, nix, objectivec, ocaml, odin, org, pascal, perl, php, powershell, prolog, properties, protobuf, pug, python, r, raku, regex, rst, ruby, rust, scala, scheme, scss, smalltalk, solidity, sql, stf, stylus, svelte, swift, systemd, tcl, toml, tsx, typescript, typst, v, vb, vue, wasm, xml, yaml, zig.

Aliases

Common aliases and file extensions resolve automatically, case-insensitively: js → javascript, ts → typescript, py → python, rb → ruby, rs → rust, cs → csharp, yml → yaml, md → markdown, and sh, shell, zsh, console, and shellscript → bash. An unknown name throws UnknownLanguageError; highlightAll and highlightCode treat it as plain text instead.

Custom languages

Anything missing can be registered at runtime — see Getting started.

Last updated on
Edit this page