mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 15:24:10 +08:00
docs: add tree-sitter grammar and comprehensive editor support (#200)
* docs: add tree-sitter grammar and editor support documentation - Add comprehensive Editor Support section to README.md - Document tree-sitter-toon grammar with usage examples - Include VS Code extension information - Add Neovim configuration example for tree-sitter - Update tools-and-playgrounds.md with detailed editor support - Add Editor Support to table of contents Resolves #143 Resolves #99 * docs: simplify --------- Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
This commit is contained in:
23
README.md
23
README.md
@@ -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)
|
||||
@@ -770,6 +771,28 @@ 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) - Syntax highlighting, validation, conversion, and token analysis.
|
||||
|
||||
```bash
|
||||
code --install-extension vishalraut.vscode-toon
|
||||
```
|
||||
|
||||
### Tree-sitter Grammar
|
||||
|
||||
[tree-sitter-toon](https://github.com/3swordman/tree-sitter-toon) - Grammar for Tree-sitter-compatible editors (Neovim, Helix, Emacs, Zed).
|
||||
|
||||
### Neovim
|
||||
|
||||
[toon.nvim](https://github.com/thalesgelinger/toon.nvim) - Lua-based plugin.
|
||||
|
||||
### 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.
|
||||
|
||||
@@ -19,13 +19,27 @@ 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) - Syntax highlighting, validation, conversion, and token analysis.
|
||||
|
||||
> [!NOTE]
|
||||
> Native TOON syntax highlighting extensions are in development. Contributions welcome!
|
||||
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) - Grammar for Tree-sitter-compatible editors (Neovim, Helix, Emacs, Zed).
|
||||
|
||||
### Neovim
|
||||
|
||||
[toon.nvim](https://github.com/thalesgelinger/toon.nvim) - Lua-based plugin for Neovim.
|
||||
|
||||
### Other Editors
|
||||
|
||||
Use YAML syntax highlighting as a close approximation. Most editors allow associating `.toon` files with YAML language mode.
|
||||
|
||||
## Web APIs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user