Syntax highlighting for Jennifer

Jennifer

Colour for .j files in Vim, Neovim, VS Code™, Sublime Text™, JetBrains™ IDEs, bat, web pages and self-hosted forges.

by @mplx

Powered by Jennifer's Cantrip - Markdown into slide decks, https://github.com/jennifer-language/cantrip
1 / 17

What we ship

File in editors/For
vim/Vim and Neovim
vscode/VS Code (a small extension)
textmate/jennifer.tmLanguage.jsoneditors that read TextMate™ grammars
sublime/jennifer.sublime-syntaxSublime Text and bat
highlightjs/jennifer.jsweb pages with highlight.js
chroma/jennifer.xmlForgejo, Gitea™, Hugo (a draft)
2 / 17

Getting the files

The packages install two of them for you:

PackageInstalls
Arch™, Debian™Vim and Neovim syntax, jennifer.sublime-syntax
anynothing for VS Code or the others

Everything else comes from the repository:

git clone https://github.com/jennifer-language/jennifer.git
cd jennifer/editors
3 / 17

Vim and Neovim

From a package: nothing to do. By hand:

# Vim
mkdir -p ~/.vim/syntax ~/.vim/ftdetect
cp vim/syntax/jennifer.vim   ~/.vim/syntax/
cp vim/ftdetect/jennifer.vim ~/.vim/ftdetect/

# Neovim: the same two files under ~/.config/nvim/
mkdir -p ~/.config/nvim/syntax ~/.config/nvim/ftdetect
cp vim/syntax/jennifer.vim   ~/.config/nvim/syntax/
cp vim/ftdetect/jennifer.vim ~/.config/nvim/ftdetect/
4 / 17

Vim: does it work?

:set filetype?
  filetype=jennifer
5 / 17

VS Code on Linux and macOS

Copy the extension folder into VS Code's extensions:

cp -r vscode ~/.vscode/extensions/jennifer-0.2.0

Or link it, so git pull updates it:

ln -s "$(pwd)/vscode" ~/.vscode/extensions/jennifer-0.2.0

Then: Command Palette, Developer: Reload Window.

6 / 17

VS Code on Windows

PowerShell™:

Copy-Item -Recurse vscode `
  "$env:USERPROFILE\.vscode\extensions\jennifer-0.2.0"

cmd.exe:

xcopy /E /I vscode "%USERPROFILE%\.vscode\extensions\jennifer-0.2.0"
7 / 17

VS Code: a package, and the check

As a single file, for any machine:

cd vscode
npx @vscode/vsce package          # gives jennifer-0.2.0.vsix
code --install-extension jennifer-0.2.0.vsix

Check: open a .j file; the status bar shows Jennifer as its language.

8 / 17

Sublime Text

Copy the syntax into your User package (Preferences, Browse Packages):

SystemFolder
Linux~/.config/sublime-text/Packages/User/
macOS™~/Library/Application Support/Sublime Text/Packages/User/
Windows%APPDATA%\Sublime Text\Packages\User\
cp sublime/jennifer.sublime-syntax ~/.config/sublime-text/Packages/User/
9 / 17

bat in the terminal

mkdir -p "$(bat --config-dir)/syntaxes"
cp sublime/jennifer.sublime-syntax "$(bat --config-dir)/syntaxes/"
bat cache --build
bat --list-languages | grep Jennifer

From a package, copy /usr/share/jennifer/syntaxes/jennifer.sublime-syntax.

10 / 17

JetBrains IDEs and other TextMate editors

textmate/jennifer.tmLanguage.json is a TextMate grammar, scope source.jennifer.

11 / 17

Web pages: highlight.js

<script src="highlight.min.js"></script>
<script src="jennifer.js"></script>
<script>hljs.highlightAll();</script>

Then mark code blocks as jennifer. In a build step:

hljs.registerLanguage("jennifer", require("./jennifer.js"));
12 / 17

Forgejo, Gitea and Hugo

[highlight.mapping]
.j = php
13 / 17

GitHub

14 / 17

Already built in

No setup needed in Jennifer's own tools:

15 / 17

Your editor is missing?

Welcome as contributions: Emacs (jennifer-mode.el), nano (.nanorc), a tree-sitter grammar (for Zed™, Helix, Neovim).

16 / 17

Where to go next

Based on Jennifer 0.26.0, November 2026.

17 / 17