mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 00:10:04 -04:00
Add tree-sitter grammar for TOON (Token-Oriented Object Notation), a JSON-alternative data format with indentation-based structure. - Add parser config in parsers.lua - Add query files: highlights, folds, indents, locals Parser repository: https://github.com/DanEscher98/tree-sitter-toon TOON spec: https://github.com/toon-format/spec 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
404 B
Scheme
17 lines
404 B
Scheme
; folds.scm - Folding queries for TOON
|
|
; Allows collapsing nested structures in editors
|
|
; Fold objects (nested key-value structures)
|
|
(pair
|
|
value: (object)) @fold
|
|
|
|
; Fold array declarations with content
|
|
(array_declaration
|
|
content: (array_content)) @fold
|
|
|
|
; Fold root arrays with content
|
|
(root_array
|
|
content: (array_content)) @fold
|
|
|
|
; Fold list items with nested objects
|
|
(list_item
|
|
(object)) @fold
|