Languages
Bundled Languages
Language grammars listed below are re-distributed via tm-grammars
into the shiki
package.
Name | ID | Alias | Preview |
---|---|---|---|
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 | asciidoc | adoc | |
Assembly | asm | ||
Astro | astro | ||
AWK | awk | ||
Ballerina | ballerina | ||
Batch File | bat | batch | |
Beancount | beancount | ||
Berry | berry | be | |
BibTeX | bibtex | ||
Bicep | bicep | ||
Blade | blade | ||
1C (Enterprise) | bsl | 1c | |
C | c | ||
Cadence | cadence | cdc | |
Cairo | cairo | ||
Clarity | clarity | ||
Clojure | clojure | clj | |
CMake | cmake | ||
COBOL | cobol | ||
CODEOWNERS | codeowners | ||
CodeQL | codeql | ql | |
CoffeeScript | coffee | coffeescript | |
Common Lisp | common-lisp | lisp | |
Coq | coq | ||
C++ | cpp | c++ | |
Crystal | crystal | ||
C# | csharp | c# cs | |
CSS | css | ||
CSV | csv | ||
CUE | cue | ||
Cypher | cypher | cql | |
D | d | ||
Dart | dart | ||
DAX | dax | ||
Desktop | desktop | ||
Diff | diff | ||
Dockerfile | docker | dockerfile | |
dotEnv | dotenv | ||
Dream Maker | dream-maker | ||
Edge | edge | ||
Elixir | elixir | ||
Elm | elm | ||
Emacs Lisp | emacs-lisp | elisp | |
ERB | erb | ||
Erlang | erlang | erl | |
Fennel | fennel | ||
Fish | fish | ||
Fluent | fluent | ftl | |
Fortran (Fixed Form) | fortran-fixed-form | f for f77 | |
Fortran (Free Form) | fortran-free-form | f90 f95 f03 f08 f18 | |
F# | fsharp | f# 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-js | gjs | |
Glimmer TS | glimmer-ts | gts | |
GLSL | glsl | ||
Gnuplot | gnuplot | ||
Go | go | ||
GraphQL | graphql | gql | |
Groovy | groovy | ||
Hack | hack | ||
Ruby Haml | haml | ||
Handlebars | handlebars | hbs | |
Haskell | haskell | hs | |
Haxe | haxe | ||
HashiCorp HCL | hcl | ||
Hjson | hjson | ||
HLSL | hlsl | ||
HTML | html | ||
HTML (Derivative) | html-derivative | ||
HTTP | http | ||
HXML | hxml | ||
Hy | hy | ||
Imba | imba | ||
INI | ini | properties | |
Java | java | ||
JavaScript | javascript | js | |
Jinja | jinja | ||
Jison | jison | ||
JSON | json | ||
JSON5 | json5 | ||
JSON with Comments | jsonc | ||
JSON Lines | jsonl | ||
Jsonnet | jsonnet | ||
JSSM | jssm | fsl | |
JSX | jsx | ||
Julia | julia | jl | |
Kotlin | kotlin | kt kts | |
Kusto | kusto | kql | |
LaTeX | latex | ||
Lean 4 | lean | lean4 | |
Less | less | ||
Liquid | liquid | ||
LLVM IR | llvm | ||
Log file | log | ||
Logo | logo | ||
Lua | lua | ||
Luau | luau | ||
Makefile | make | makefile | |
Markdown | markdown | md | |
Marko | marko | ||
MATLAB | matlab | ||
MDC | mdc | ||
MDX | mdx | ||
Mermaid | mermaid | mmd | |
MIPS Assembly | mipsasm | mips | |
Mojo | mojo | ||
Move | move | ||
Narrat Language | narrat | nar | |
Nextflow | nextflow | nf | |
Nginx | nginx | ||
Nim | nim | ||
Nix | nix | ||
nushell | nushell | nu | |
Objective-C | objective-c | objc | |
Objective-C++ | objective-cpp | ||
OCaml | ocaml | ||
Pascal | pascal | ||
Perl | perl | ||
PHP | php | ||
PL/SQL | plsql | ||
Gettext PO | po | pot potx | |
Polar | polar | ||
PostCSS | postcss | ||
PowerQuery | powerquery | ||
PowerShell | powershell | ps ps1 | |
Prisma | prisma | ||
Prolog | prolog | ||
Protocol Buffer 3 | proto | protobuf | |
Pug | pug | jade | |
Puppet | puppet | ||
PureScript | purescript | ||
Python | python | py | |
QML | qml | ||
QML Directory | qmldir | ||
Qt Style Sheets | qss | ||
R | r | ||
Racket | racket | ||
Raku | raku | perl6 | |
ASP.NET Razor | razor | ||
Windows Registry Script | reg | ||
RegExp | regexp | regex | |
Rel | rel | ||
RISC-V | riscv | ||
reStructuredText | rst | ||
Ruby | ruby | rb | |
Rust | rust | rs | |
SAS | sas | ||
Sass | sass | ||
Scala | scala | ||
Scheme | scheme | ||
SCSS | scss | ||
1C (Query) | sdbl | 1c-query | |
ShaderLab | shaderlab | shader | |
Shell | shellscript | bash sh shell zsh | |
Shell Session | shellsession | console | |
Smalltalk | smalltalk | ||
Solidity | solidity | ||
Closure Templates | soy | closure-templates | |
SPARQL | sparql | ||
Splunk Query Language | splunk | spl | |
SQL | sql | ||
SSH Config | ssh-config | ||
Stata | stata | ||
Stylus | stylus | styl | |
Svelte | svelte | ||
Swift | swift | ||
SystemVerilog | system-verilog | ||
Systemd Units | systemd | ||
TalonScript | talonscript | talon | |
Tasl | tasl | ||
Tcl | tcl | ||
Templ | templ | ||
Terraform | terraform | tf tfvars | |
TeX | tex | ||
TOML | toml | ||
TypeScript with Tags | ts-tags | lit | |
TSV | tsv | ||
TSX | tsx | ||
Turtle | turtle | ||
Twig | twig | ||
TypeScript | typescript | ts | |
TypeSpec | typespec | tsp | |
Typst | typst | typ | |
V | v | ||
Vala | vala | ||
Visual Basic | vb | cmd | |
Verilog | verilog | ||
VHDL | vhdl | ||
Vim Script | viml | vim vimscript | |
Vue | vue | ||
Vue HTML | vue-html | ||
Vyper | vyper | vy | |
WebAssembly | wasm | ||
Wenyan | wenyan | 文言 | |
WGSL | wgsl | ||
Wikitext | wikitext | mediawiki wiki | |
WebAssembly Interface Types | wit | ||
Wolfram | wolfram | wl | |
XML | xml | ||
XSL | xsl | ||
YAML | yaml | yml | |
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.