Host-neutral syntax highlighting and deterministic formatting, with MUD as the reference language pack. The monorepo keeps language knowledge separate from renderers and host integrations so the same semantic spans and edits can be used from a CLI, CodeMirror 6, Obsidian, an MCP App, or a server.
| Package | Responsibility |
|---|---|
@r3nner/syntax-highlight-core |
Stable language-pack, span, edit, and formatter contracts |
@r3nner/syntax-highlight-language-mud |
Grammar-derived MUD tokenizer and formatter |
@r3nner/syntax-highlight-html |
Escaped HTML and theme CSS renderer |
@r3nner/syntax-highlight-codemirror |
CodeMirror 6 decorations and formatting changes |
@r3nner/syntax-highlight-mcp |
MCP App resource and tool-result helpers |
@r3nner/syntax-highlight-cli |
Headless highlight and format commands |
@r3nner/syntax-highlight-obsidian |
Obsidian Reading/Live Preview/source integration |
The Obsidian package supports common programming languages plus configured
language packs, including PowerShell stream-mode highlighting, fenced blocks
inside blockquotes/callouts, and configurable Text/Markdown presentation
families. Markdown source is decorated through CodeMirror's public extension
APIs; rendered Markdown uses Obsidian's code-block processors plus a structural
Reading fallback. Theme integration is based on stable syntax-common-* classes
and public Obsidian CSS variables rather than private Live Preview DOM.
See:
packages/obsidian/README.mdfor usage and local installation;docs/architecture.mdfor package/host boundaries;docs/theme-integration.mdfor semantic classes, quoted-source styling and contrast behavior;docs/migration.mdfor the legacy Obsidian plugin migration.
Requires Node.js 22 or newer.
npm ci
npm run check
npm run pack:allThe MUD pack embeds a tested grammar snapshot. Check it against a MUD checkout:
node scripts/check-mud-compat.mjs --mud-root ../MudAll packages are MIT licensed.