grammars/README.md
PRQL contains multiple grammar definitions to enable tools to highlight PRQL code. These are all intended to provide as good an experience as the grammar supports. Please raise any shortcomings in a GitHub issue.
The definitions are somewhat scattered around the codebase; this page serves as an index.
Ace — supported. The grammar is upstream (prql_highlight_rules.js). See the demo.
chroma — Go library used by the static website generator Hugo. The grammar is upstream (prql.xml). See the demo.
CotEditor — text editor for macOS. File is at
grammars/CotEditor/.
Lezer — used by CodeMirror editors. The PRQL
file is at
grammars/prql-lezer/README.md.
emacs — used by terminal-based text editor GNU Emacs. File is at
grammars/emacs/.
GtkSourceView — used by GNOME Text Editor, GNOME Builder and other GTK
applications. File is at
grammars/GtkSourceView/.
Handlebars — currently duplicated:
book/highlight-prql.jswebsite/themes/prql-theme/static/plugins/highlight/prql.jsKSyntaxHighlighting — used by Kate, KWrite and KDevelop and other Qt
applications. File is at
grammars/KSyntaxHighlighting/.
micro — used by terminal-based text editor Micro. The grammar is upstream.
nano — used by terminal-based text editor GNU
nano. File is at
grammars/nano/.
Sublime Text — in the sublime-prql
repository.
TextMate — used by the VS Code extension; in the prql-vscode repo in
prql-vscode/syntaxes/prql.tmLanguage.json.
Monarch — used by
the Monaco editor, which we use for the Playground. The grammar is at
playground/src/workbench/prql-syntax.js.
Pygments — Python library used by Wikipedia, Bitbucket, Sphinx and more. The grammar is upstream (prql.py). See the demo.
Raku — Grammar can be found at
grammars/raku/.
Tree-Sitter — used by the neovim and helix. The grammar can be found at https://github.com/PRQL/tree-sitter-prql.
vim — used by terminal-based text editor Vim.
Instructions at
grammars/vim/. The
grammar is
upstream.