Languages

ubc build html and ubc build pdf colour a code block from a bundled grammar, chosen by the language name you write:

.. code-block:: python

   print("hello")

This page lists the names the two builders answer. The table is generated from the engine that ships, and a test compares it against a fresh generation on every build of this project, so a name listed here is a name ubc resolves, and every name ubc will suggest to you is listed here. (A handful of spellings resolve without being listed; Reading the table says which and why.)

How a name is resolved

Three steps, in order, and the first answer wins:

  1. your own aliases, if the project declares any;

  2. the built-in table, which is the one the rows below are drawn from;

  3. the grammar collection’s own names, as a fall-back.

Names are matched ignoring case and surrounding whitespace, so Python, python and `` python `` are one name.

A name none of the three steps answers is reported as build.highlight_language_unknown, once per name for the whole build — with up to three of the places it is written, and a count of all of them — and with a did you mean suggestion when a close spelling exists; and under the default --deny warning that stops the build. The block is still drawn, uncoloured.

Reading the table

Language

The grammar’s own name, as the collection publishes it.

Names you can write

Every name that reaches that grammar. Write any one of them.

Grammar

The Sublime-syntax scope the colouring comes from. It is the useful thing to quote in a bug report about a mis-coloured block.

Source

ubCode for a grammar written and maintained in this repository, bat collection for one of the third-party definitions curated by the bat project and shipped with ubc. The third-party definitions’ licences travel with the binary in THIRD-PARTY-NOTICES-syntaxes.md.

The first row is the one that turns colouring off: a block written .. code-block:: text — or none, plain, plaintext, raw or output — is drawn plain and reports nothing, which is how you silence the finding for a listing that is not code at all.

Two things the table deliberately leaves out. A grammar’s file extensions also resolve today (.. code-block:: pyi colours as Python), but they are not promised and not listed: they are a fall-back rather than a name this project has decided to support. And a name of your own is not here by definition — declare one with [build.highlight] aliases and it wins over everything in the table.

Note

Both builders and the VS Code preview read this table, so a listing is coloured by the same grammar on the site, on paper and in the editor.

Supported names

Every language name ubc answers

Language

Names you can write

Grammar

Source

(plain)

none, output, plain, plaintext, raw, text

—

—

ActionScript

actionscript

source.actionscript.2

bat collection

Ada

ada, ada2005, ada95

source.ada

bat collection

Apache Conf

aconf, apache, apache conf, apacheconf

source.apacheconf

bat collection

AppleScript

applescript, osascript

source.applescript

bat collection

ARM Assembly

arm assembly

source.asm.arm

bat collection

AsciiDoc (Asciidoctor)

asciidoc (asciidoctor)

text.asciidoc

bat collection

Authorized Keys

authorized keys

text.authorized_keys

bat collection

AWK

awk, gawk, mawk, nawk

source.awk

bat collection

Batch File

bat, batch, batch file, cmd, dos, dosbatch, winbatch

source.dosbatch

bat collection

BibTeX

bibtex

text.bibtex

bat collection

Bourne Again Shell (bash)

bash, bourne again shell (bash), ksh, sh, shell, shell-script, zsh

source.shell.bash

bat collection

C

c, h

source.c

bat collection

C#

c#, cs, csharp

source.cs

bat collection

C++

c++, cc, cpp, cxx, h++, hh, hpp, hxx

source.c++

bat collection

Cabal

cabal

source.cabal

bat collection

camlp4

camlp4

source.camlp4.ocaml

bat collection

CFML

cfml

embedding.cfml

bat collection

Clojure

clojure

source.clojure

bat collection

CMake

cmake, cmake.in

source.cmake

bat collection

CMake C Header

cmake c header

source.cmake.config.c

bat collection

CMake C++ Header

cmake c++ header

source.cmake.config.c++

bat collection

CMakeCache

cmakecache

source.cmakecache

bat collection

CoffeeScript

coffee-script, coffeescript

source.coffee

bat collection

Comma Separated Values

comma separated values

text.csv.comma

bat collection

Command Help

command help

text.cmd-help

bat collection

CpuInfo

cpuinfo

source.cpuinfo

bat collection

Crontab

crontab

source.crontab

bat collection

Crystal

crystal

source.crystal

bat collection

CSS

css

source.css

bat collection

Cypher

cql, cyp, cypher

source.cypher

ubCode

D

d

source.d

bat collection

Dart

dart

source.dart

bat collection

debsources

debsources

text.apt-source-list

bat collection

Diff

diff, patch, udiff

source.diff

bat collection

Dockerfile

docker, dockerfile

source.dockerfile

bat collection

Dockerfile (with bash)

dockerfile (with bash)

source.dockerfile.bash

bat collection

DotENV

dotenv

source.env

bat collection

Elixir

elixir

source.elixir

bat collection

Elm

elm

source.elm

bat collection

Email

email

text.eml

bat collection

Erlang

erlang

source.erlang

bat collection

F#

f#, fsharp

source.fsharp

bat collection

Fish

fish, fishshell

source.shell.fish

bat collection

Fortran (Fixed Form)

fortran (fixed form)

source.fixedform-fortran

bat collection

Fortran (Modern)

f90, fortran, fortran (modern)

source.modern-fortran

bat collection

Fortran Namelist

fortran namelist

source.fortran-namelist

bat collection

fstab

fstab

source.fstab

bat collection

GDScript (Godot Engine)

gdscript (godot engine)

source.gdscript

bat collection

Git Attributes

git attributes

text.git.attributes

bat collection

Git Commit

git commit

text.git.commit

bat collection

Git Config

git config

text.git.config

bat collection

Git Ignore

git ignore

text.git.ignore

bat collection

Git Link

git link

text.git.link

bat collection

Git Log

git log

text.git.log

bat collection

Git Mailmap

git mailmap

text.git.mailmap

bat collection

Git Rebase Todo

git rebase todo

text.git.rebase

bat collection

GLSL

glsl

source.glsl

bat collection

gnuplot

gnuplot

source.gnuplot

bat collection

Go

go, golang

source.go

bat collection

Gomod

gomod

source.gomod

bat collection

Gosum

gosum

source.gosum

bat collection

GraphQL

graphql

source.graphql

bat collection

Graphviz (DOT)

graphviz, graphviz (dot)

source.dot

bat collection

Groff/troff

groff/troff

text.groff

bat collection

Groovy

groovy

source.groovy

bat collection

group

group

source.group

bat collection

Haskell

haskell

source.haskell

bat collection

Highlight non-printables

highlight non-printables

whitespace

bat collection

Hosts File

hosts file

text.hosts

bat collection

HTML

html, xhtml

text.html.basic

bat collection

HTML (ASP)

asp, html (asp)

text.html.asp

bat collection

HTML (EEx)

html (eex)

text.html.elixir

bat collection

HTML (Erlang)

html (erlang)

text.html.erlang

bat collection

HTML (Jinja2)

html (jinja2), html+django, html+jinja, htmldjango

text.html.jinja2

bat collection

HTML (Rails)

html (rails)

text.html.ruby

bat collection

HTML (Tcl)

html (tcl)

text.html.tcl

bat collection

HTML (Twig)

html (twig)

text.html.twig

bat collection

HTTP Request and Response

http request and response

text.http-request-response

bat collection

Idris

idris

source.idris2

bat collection

INI

cfg, conf, dosini, ini

source.ini

bat collection

Java

java

source.java

bat collection

Java Properties

java properties

source.java-props

bat collection

Java Server Page (JSP)

java server page (jsp), jsp

text.html.jsp

bat collection

JavaScript

cjs, javascript, js, jsx, mjs

source.js

bat collection

JavaScript (Babel)

javascript (babel)

source.js

bat collection

JavaScript (Rails)

javascript (rails)

source.js.rails

bat collection

Jinja2

django, jinja, jinja2

source.jinja2

bat collection

JQ

jq

source.jq

bat collection

JSON

json, json-object, json5, jsonc

source.json

bat collection

jsonnet

jsonnet

source.jsonnet

bat collection

Julia

julia

source.julia

bat collection

Known Hosts

known hosts

text.known_hosts

bat collection

Kotlin

kotlin, kt, ktm, kts, ktx

source.Kotlin

bat collection

LaTeX

latex, tex

text.tex.latex

bat collection

LaTeX Log

latex log

text.log.latex

bat collection

Lean 4

lean 4, lean4

source.lean4

bat collection

Less

less

source.less

bat collection

Lisp

lisp

source.lisp

bat collection

Literate Haskell

lhaskell, literate haskell, literate-haskell

text.tex.latex.haskell

bat collection

LiveScript

live-script, livescript

source.livescript

bat collection

LLVM

llvm

source.llvm

bat collection

log

log

text.log

bat collection

Lua

lua, pluto

source.lua

bat collection

Makefile

bsdmake, mak, make, makefile, mf, mk

source.makefile

bat collection

Manpage

manpage

source.man

bat collection

Markdown

markdown, md, mkd, mkdown

text.html.markdown

bat collection

MATLAB

matlab

source.matlab

bat collection

MediaWiki

mediawiki

text.html.mediawiki

bat collection

MemInfo

meminfo

source.meminfo

bat collection

MultiMarkdown

multimarkdown

text.html.markdown.multimarkdown

bat collection

MyST

myst, myst-markdown, mystmd

text.html.markdown.myst

ubCode

NAnt Build File

nant build file

source.nant-build

bat collection

nginx

nginx

source.nginx

bat collection

Nim

nim

source.nim

bat collection

Ninja

ninja

source.ninja

bat collection

Nix

nix, nixos

source.nix

bat collection

NSIS

nsis

source.nsis

bat collection

Objective-C

obj-c, objc, objective-c, objectivec

source.objc

bat collection

Objective-C++

obj-c++, objc++, objective-c++, objectivec++

source.objc++

bat collection

OCaml

ocaml

source.ocaml

bat collection

OCamllex

ocamllex

source.ocamllex

bat collection

OCamlyacc

ocamlyacc

source.ocamlyacc

bat collection

Odin

odin

source.odin

bat collection

orgmode

org-mode, orgmode

text.orgmode

bat collection

Pascal

pascal

source.pascal

bat collection

passwd

passwd

source.passwd

bat collection

Perl

perl, pl, pm

source.perl

bat collection

PHP

html+php, php

embedding.php

bat collection

Pipe Separated Values

pipe separated values

text.csv.pipe

bat collection

Plain Text

plain text

text.plain

bat collection

PowerShell

posh, powershell, ps, ps1, psm1, pwsh

source.powershell

bat collection

Private Key

private key

source.ssh.private-key

bat collection

Protocol Buffer

protocol buffer

source.proto

bat collection

Protocol Buffer (TEXT)

protocol buffer (text)

text.prototxt

bat collection

Puppet

puppet

source.puppet

bat collection

PureScript

purescript

source.purescript

bat collection

Python

default, gyp, ipython, ipython2, ipython3, py, py2, py3, python, python2, python3, sage, starlark

source.python

bat collection

Python Console

doctest, pycon, pycon3, python console, python-console, python-repl

source.python-console

ubCode

QML

qbs, qml

source.qml

bat collection

R

r, rscript, splus

source.r

bat collection

R Console

r console, rconsole, rout

source.r-console

bat collection

Racket

racket

source.racket

bat collection

Rd (R Documentation)

rd (r documentation)

text.tex.latex.rd

bat collection

Rego

rego

source.rego

bat collection

Regular Expression

regex, regexp, regular expression

source.regexp

bat collection

Requirements.txt

requirements.txt

source.requirements-txt

bat collection

resolv

resolv

source.resolv

bat collection

reStructuredText

rest, restructuredtext, rst

text.restructuredtext

ubCode

Robot Framework

robot framework, robotframework

source.robot

bat collection

Ruby

duby, gemspec, irb, podspec, rb, ruby, thor

source.ruby

bat collection

Ruby Haml

ruby haml

text.haml

bat collection

Ruby on Rails

ruby on rails

source.ruby.rails

bat collection

Ruby Slim

ruby slim

text.slim

bat collection

Rust

rs, rust

source.rust

bat collection

Salt State (SLS)

salt state (sls)

source.sls

bat collection

Sass

sass

source.sass

bat collection

Scala

scala

source.scala

bat collection

SCSS

scss

source.scss

bat collection

Semi-Colon Separated Values

semi-colon separated values

text.csv.semi-colon

bat collection

Separated Values

separated values

text.csv

bat collection

Shell Session

console, shell session, shell-session, shellsession

source.shell-session

ubCode

SML

sml

source.sml

bat collection

Solidity

solidity

source.solidity

bat collection

SQL

sql, tsql

source.sql

bat collection

SQL (Rails)

sql (rails)

source.sql.ruby

bat collection

SSH Config

ssh config

source.ssh_config

bat collection

SSHD Config

sshd config

source.sshd_config

bat collection

Strace

strace

source.strace

bat collection

Stylus

stylus

source.stylus

bat collection

Svelte

svelte

text.html.svelte

bat collection

Swift

swift

source.swift

bat collection

syslog

syslog

text.log.syslog

bat collection

SystemVerilog

systemverilog

source.systemverilog

bat collection

Tab Separated Values

tab separated values

text.csv.tab

bat collection

Tcl

tcl

source.tcl

bat collection

Terraform

terraform

source.terraform

bat collection

Textile

textile

text.html.textile

bat collection

Todo.txt

todo.txt, todotxt

text.todotxt

bat collection

TOML

toml

source.toml

bat collection

TypeScript

cts, mts, ts, tsx, typescript

source.ts

bat collection

TypeScriptReact

typescriptreact

source.tsx

bat collection

Typst

typ, typc, typst

text.typst

bat collection

varlink

varlink

source.varlink

bat collection

Verilog

verilog

source.verilog

bat collection

VHDL

vhdl

source.vhdl

bat collection

VimHelp

vimhelp

source.vimhelp

bat collection

VimL

viml

source.viml

bat collection

Vue Component

vue component

text.html.vue

bat collection

Vyper

vyper

source.vyper

bat collection

WGSL

wgsl

source.wgsl

bat collection

x86_64 Assembly

x86_64 assembly

source.asm.x86_64

bat collection

XML

atom, plist, rss, svg, wsf, xjb, xml, xsd, xsl

text.xml

bat collection

YAML

yaml, yml

source.yaml

bat collection

Zig

zig

source.zig

bat collection