A Chrome extension (Manifest V3, Bun + TypeScript) that adds Rell syntax highlighting on github.com, gitlab.com, and bitbucket.org, where the language is not natively supported.
It highlights:
.rellfiles in blob/blame views on GitHub (virtualized react code view) and GitLab (chunked source viewer, raw file fetched once per page),.relldiffs in GitHub's react diff viewer (pull request "Files changed", commit and compare pages), GitLab MR/commit diffs, and Bitbucket PR diffs — each file's visible lines are tokenized as one text so block comments keep state across lines,.rellfiles on Bitbucket Cloud by registering Rell as a Monaco editor language (Monarch tokenizer) from a MAIN-world script — Monaco then colors tokens with its own theme,- fenced
```rellcode blocks in READMEs, issues, MRs/PRs, and comments (pre[lang="rell"],code.language-rell, GitLab'spre[data-canonical-lang="rell"]).
Tokens are wrapped in each site's native syntax classes — GitHub pl-*, GitLab hljs-* (styled under .code.highlight in every GitLab theme) — so colors automatically match the user's site theme in both light and dark mode. Bitbucket markdown blocks use the extension's own small injected CSS.
Self-hosted GitLab/Bitbucket instances are not matched by default; add your host to content_scripts.matches in static/manifest.json if you need one.
The tokenizer (src/rell.ts) is hand-derived from the ANTLR grammar at rell3/rell-base/frontend/src/main/antlr/Rell.g4: keywords, true/false/null, integers, hex, big integers (L), decimals, strings, bytes literals (x"…"/x'…'), line and multi-line comments, @annotations, and definition names.
The latest build from master is available as a CI artifact: rell-github-highlighting.zip. Extract it and load the folder as described in Install in Chrome.
bun install
bun run build # bundles to extension-unpacked/ (gitignored)- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked and select the
extension-unpacked/directory.
bun test # tokenizer tests
bun run typecheck # tsc --noEmitAfter code changes, re-run bun run build and hit the reload icon on the extension card in chrome://extensions.
