TOON
TOON Syntax Highlighting for Sublime Text 3
Details
Installs
- Total 0
- Win 0
- Mac 0
- Linux 0
| Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
TOON for Sublime Text
Syntax highlighting for TOON (Token-Oriented Object Notation) in Sublime Text - and in bat, which reads the same .sublime-syntax format.
Installation
Package Control
Once the package is accepted: Command Palette > Package Control: Install Package > TOON.
Manual (Sublime Text)
Clone into your Packages/ directory as TOON (macOS path shown):
git clone https://github.com/mpgirro/sublime-toon-syntax.git \
"$HOME/Library/Application Support/Sublime Text 3/Packages/TOON"
bat
Until bundled with bat itself, install as a local syntax:
mkdir -p "$(bat --config-dir)/syntaxes"
git clone https://github.com/mpgirro/sublime-toon-syntax.git "$(bat --config-dir)/syntaxes/sublime-toon-syntax"
bat cache --build
bat sample.toon # highlighted
What gets highlighted
Comments, keys (quoted and unquoted), array headers with length markers [N], delimiter markers (, / tab / |) and {field,lists}, list items and their payloads (- key: value, nested headers), double-quoted strings with escape validation, numbers, true/false/null, inline primitive arrays (tags[3]: a,b,c), and tabs in indentation flagged as invalid.
Tabular rows are delimiter-aware: only the delimiter declared in the header separates cells, and primitives highlight as complete cells only - v1.2 stays plain, 7 lights up (see docs/adr/0003-delimiter-aware-rows.md).
Development
# Symlink for live development (macOS); the name TOON matters
ln -s "$PWD" "$HOME/Library/Application Support/Sublime Text 3/Packages/TOON"
Tests live in syntax_test_toon.toon. Run them inside Sublime via Tools > Build, or headlessly with syntect's test runner (this also proves bat compatibility):
git clone --depth 1 https://github.com/trishume/syntect.git
cargo build --example syntest --manifest-path syntect/Cargo.toml
mkdir -p /tmp/pkg && ln -sfn "$PWD" /tmp/pkg/TOON
syntect/target/debug/examples/syntest syntax_test_toon.toon /tmp/pkg
License
MIT - see LICENSE.