Skip to content

Languages

Bundled Languages

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

?
NameIDAliasPreview
ABAPabap
ActionScriptactionscript-3
Adaada
Angular HTMLangular-html
Angular TypeScriptangular-ts
Apache Confapache
Apexapex
APLapl
AppleScriptapplescript
Araara
AsciiDocasciidocadoc
Assemblyasm
Astroastro
AWKawk
Ballerinaballerina
Batch Filebatbatch
Beancountbeancount
Berryberrybe
BibTeXbibtex
Bicepbicep
Bladeblade
1C (Enterprise)bsl1c
Cc
Cadencecadencecdc
Cairocairo
Clarityclarity
Clojureclojureclj
CMakecmake
COBOLcobol
CODEOWNERScodeowners
CodeQLcodeqlql
CoffeeScriptcoffeecoffeescript
Common Lispcommon-lisplisp
Coqcoq
C++cppc++
Crystalcrystal
C#csharpc#cs
CSScss
CSVcsv
CUEcue
Cyphercyphercql
Dd
Dartdart
DAXdax
Desktopdesktop
Diffdiff
Dockerfiledockerdockerfile
dotEnvdotenv
Dream Makerdream-maker
Edgeedge
Elixirelixir
Elmelm
Emacs Lispemacs-lispelisp
ERBerb
Erlangerlangerl
Fennelfennel
Fishfish
Fluentfluentftl
Fortran (Fixed Form)fortran-fixed-formfforf77
Fortran (Free Form)fortran-free-formf90f95f03f08f18
F#fsharpf#fs
GDResourcegdresource
GDScriptgdscript
GDShadergdshader
Geniegenie
Gherkingherkin
Git Commit Messagegit-commit
Git Rebase Messagegit-rebase
Gleamgleam
Glimmer JSglimmer-jsgjs
Glimmer TSglimmer-tsgts
GLSLglsl
Gnuplotgnuplot
Gogo
GraphQLgraphqlgql
Groovygroovy
Hackhack
Ruby Hamlhaml
Handlebarshandlebarshbs
Haskellhaskellhs
Haxehaxe
HashiCorp HCLhcl
Hjsonhjson
HLSLhlsl
HTMLhtml
HTML (Derivative)html-derivative
HTTPhttp
HXMLhxml
Hyhy
Imbaimba
INIiniproperties
Javajava
JavaScriptjavascriptjs
Jinjajinja
Jisonjison
JSONjson
JSON5json5
JSON with Commentsjsonc
JSON Linesjsonl
Jsonnetjsonnet
JSSMjssmfsl
JSXjsx
Juliajuliajl
Kotlinkotlinktkts
Kustokustokql
LaTeXlatex
Lean 4leanlean4
Lessless
Liquidliquid
Log filelog
Logologo
Lualua
Luauluau
Makefilemakemakefile
Markdownmarkdownmd
Markomarko
MATLABmatlab
MDCmdc
MDXmdx
Mermaidmermaidmmd
MIPS Assemblymipsasmmips
Mojomojo
Movemove
Narrat Languagenarratnar
Nextflownextflownf
Nginxnginx
Nimnim
Nixnix
nushellnushellnu
Objective-Cobjective-cobjc
Objective-C++objective-cpp
OCamlocaml
Pascalpascal
Perlperl
PHPphp
PL/SQLplsql
Gettext POpopotpotx
Polarpolar
PostCSSpostcss
PowerQuerypowerquery
PowerShellpowershellpsps1
Prismaprisma
Prologprolog
Protocol Buffer 3protoprotobuf
Pugpugjade
Puppetpuppet
PureScriptpurescript
Pythonpythonpy
QMLqml
QML Directoryqmldir
Qt Style Sheetsqss
Rr
Racketracket
Rakurakuperl6
ASP.NET Razorrazor
Windows Registry Scriptreg
RegExpregexpregex
Relrel
RISC-Vriscv
reStructuredTextrst
Rubyrubyrb
Rustrustrs
SASsas
Sasssass
Scalascala
Schemescheme
SCSSscss
1C (Query)sdbl1c-query
ShaderLabshaderlabshader
Shellshellscriptbashshshellzsh
Shell Sessionshellsessionconsole
Smalltalksmalltalk
Soliditysolidity
Closure Templatessoyclosure-templates
SPARQLsparql
Splunk Query Languagesplunkspl
SQLsql
SSH Configssh-config
Statastata
Stylusstylusstyl
Sveltesvelte
Swiftswift
SystemVerilogsystem-verilog
Systemd Unitssystemd
TalonScripttalonscripttalon
Tasltasl
Tcltcl
Templtempl
Terraformterraformtftfvars
TeXtex
TOMLtoml
TypeScript with Tagsts-tagslit
TSVtsv
TSXtsx
Turtleturtle
Twigtwig
TypeScripttypescriptts
TypeSpectypespectsp
Typsttypsttyp
Vv
Valavala
Visual Basicvbcmd
Verilogverilog
VHDLvhdl
Vim Scriptvimlvimvimscript
Vuevue
Vue HTMLvue-html
Vypervypervy
WebAssemblywasm
Wenyanwenyan文言
WGSLwgsl
Wikitextwikitextmediawikiwiki
Wolframwolframwl
XMLxml
XSLxsl
YAMLyamlyml
ZenScriptzenscript
Zigzig

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:

  Welcome to VitePress!

  Where should VitePress initialize the config?
  ./docs

  Site title:
  My Awesome Project

  Site description:
  A VitePress Site

  Theme:
 Default Theme (Out of the box, good-looking docs)
 Default Theme + Customization
 Custom Theme

Check the raw markdown of code snippet above.

Released under the MIT License.