nvim-treesitter/queries/toon/folds.scm
Danyiel Colin 79880d8d09 feat: add TOON parser support
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>
2025-11-30 02:06:36 -06:00

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