Sebastián Salas14 downloadsSyntax highlighting for TOON (Token-Oriented Object Notation) in fenced code blocks.
Syntax highlighting for TOON (Token-Oriented Object Notation) in fenced code blocks, so tabular dumps stay readable inside your notes.
Colors come from Obsidian's own --code-* variables, so the highlighting adapts to whatever theme you use, in both light and dark mode.
Tag a fenced code block with toon:
```toon
# inventory snapshot
warehouse: north
items[3]{sku,name,qty,price,note}:
1001,Keyboard,42,29.99,null
1002,Monitor,7,189.50,"Restock by: 2025-06-30"
1003,Mouse,0,12.00,null
```
Works in Reading View and Live Preview. Source mode shows plain text, since it is a rendered-markdown post processor and Source mode renders no HTML.
| Token | Matches | Obsidian variable |
|---|---|---|
| Key | table name and header fields | --code-property |
| String | double-quoted text | --code-string |
| Number | integers and decimals, incl. exponents | --code-value |
| Keyword | null, true, false |
--code-keyword |
| Punctuation | [ ] { } , : |
--code-punctuation |
| Comment | lines starting with # |
--code-comment |
| Plain | everything else | --code-normal |
Quoted values are parsed properly: a colon inside "Restock by: 2025-06-30" does not turn the row into a key: value line, and "" / \" escapes are respected.
| Setting | Default | Effect |
|---|---|---|
| Wrap long lines | Off | Wraps block content instead of scrolling horizontally |
Wrapping uses overflow-wrap: anywhere because TOON rows are comma-separated with no spaces — plain pre-wrap finds no break opportunity in a line of UUIDs and timestamps.
Settings → Community plugins → Browse → search for TOON Syntax Highlight.
main.js, manifest.json and styles.css from the latest release.<vault>/.obsidian/plugins/toon-syntax/.Plain JavaScript, no build step. Clone into your vault's plugins folder and reload:
git clone https://github.com/sebasalas/obsidian-toon-syntax.git \
<vault>/.obsidian/plugins/toon-syntax
Releases are automated: push a tag matching the manifest.json version and the workflow in .github/workflows/release.yml drafts a release with the three required assets.
git tag 1.0.1 && git push origin 1.0.1