Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Think of it as a translation layer: use JSON programmatically, and encode it as
- [Benchmarks](#benchmarks)
- [Installation & Quick Start](#installation--quick-start)
- [Playgrounds](#playgrounds)
- [Editor Support](#editor-support)
- [CLI](#cli)
- [Format Overview](#format-overview)
- [Using TOON with LLMs](#using-toon-with-llms)
Expand Down Expand Up @@ -770,6 +771,37 @@ Experiment with TOON format interactively using these community-built tools for
- [Format Tokenization Playground](https://www.curiouslychase.com/playground/format-tokenization-exploration)
- [TOON Tools](https://toontools.vercel.app/)

## Editor Support

### VS Code

**[TOON Language Support](https://marketplace.visualstudio.com/items?itemName=vishalraut.vscode-toon)** - Full-featured extension providing comprehensive tooling for working with TOON files.

**Features:**
- 🎨 Syntax highlighting with color-coded support for arrays, objects, and values
- ✅ Real-time validation with error highlighting and detailed messages
- 🔄 Bidirectional conversion (TOON ↔ JSON) with format options
- 📝 Code snippets for common TOON patterns
- 💰 Token optimization with visual feedback on savings
- ⚙️ Configurable indentation and delimiters (comma, tab, pipe)

Install from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=vishalraut.vscode-toon) or via command line:

```bash
code --install-extension vishalraut.vscode-toon
```

### Tree-sitter Grammar

**[tree-sitter-toon](https://github.com/3swordman/tree-sitter-toon)** - Tree-sitter grammar for TOON syntax highlighting and parsing.

Enables syntax highlighting support for editors that use Tree-sitter (Neovim, Helix, Emacs, etc.). The grammar provides accurate tokenization and can be used as a foundation for Language Server Protocol implementations.

### Other Editors

- **Vim/Neovim**: [toon.nvim](https://github.com/thalesgelinger/toon.nvim)
- **Other editors**: Use YAML syntax highlighting as a close approximation

## CLI

Command-line tool for quick JSON↔TOON conversions, token analysis, and pipeline integration. Auto-detects format from file extension, supports stdin/stdout workflows, and offers delimiter options for maximum efficiency.
Expand Down
54 changes: 49 additions & 5 deletions docs/ecosystem/tools-and-playgrounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,57 @@ npx @toon-format/cli input.json --stats -o output.toon

## Editor Support

TOON syntax highlighting is available for popular editors:
### VS Code

- **VS Code**: Use YAML syntax highlighting as a close approximation (`.toon` files can be associated with YAML language mode).
- **Vim/Neovim**: [toon.nvim](https://github.com/thalesgelinger/toon.nvim)
**[TOON Language Support](https://marketplace.visualstudio.com/items?itemName=vishalraut.vscode-toon)** - Full-featured extension providing comprehensive tooling for working with TOON files.

> [!NOTE]
> Native TOON syntax highlighting extensions are in development. Contributions welcome!
**Features:**
- 🎨 Syntax highlighting with color-coded support for arrays, objects, and values
- ✅ Real-time validation with error highlighting and detailed messages
- 🔄 Bidirectional conversion (TOON ↔ JSON) with format options
- 📝 Code snippets for common TOON patterns
- 💰 Token optimization with visual feedback on savings
- ⚙️ Configurable indentation and delimiters (comma, tab, pipe)

Install from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=vishalraut.vscode-toon) or via command line:

```bash
code --install-extension vishalraut.vscode-toon
```

### Tree-sitter Grammar

**[tree-sitter-toon](https://github.com/3swordman/tree-sitter-toon)** - Tree-sitter grammar for TOON syntax highlighting and parsing.

Enables syntax highlighting support for editors that use Tree-sitter, including:
- **Neovim** (with nvim-treesitter)
- **Helix Editor**
- **Emacs** (with tree-sitter mode)
- **Zed Editor**
- Any editor with Tree-sitter support

The grammar provides accurate tokenization and can be used as a foundation for Language Server Protocol (LSP) implementations.

**Usage with Neovim:**

Add to your Tree-sitter configuration:

```lua
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.toon = {
install_info = {
url = "https://github.com/3swordman/tree-sitter-toon",
files = {"src/parser.c"},
branch = "main",
},
filetype = "toon",
}
```

### Other Editors

- **Vim/Neovim**: [toon.nvim](https://github.com/thalesgelinger/toon.nvim) - Lua-based TOON support
- **Other editors**: Use YAML syntax highlighting as a close approximation (`.toon` files can be associated with YAML language mode)

## Web APIs

Expand Down