mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 17:00:09 -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>
23 lines
626 B
Scheme
23 lines
626 B
Scheme
; indents.scm - Indentation queries for TOON
|
|
; Guides automatic indentation in editors
|
|
; Indent after opening a nested object
|
|
(pair
|
|
value: (object) @indent.begin)
|
|
|
|
; Indent after array declaration with content
|
|
(array_declaration
|
|
content: (array_content) @indent.begin)
|
|
|
|
; Indent after root array with content
|
|
(root_array
|
|
content: (array_content) @indent.begin)
|
|
|
|
; Indent inside list items with nested content
|
|
(list_item
|
|
(object) @indent.begin)
|
|
|
|
; Dedent at end of objects/arrays (handled by external scanner)
|
|
; These markers indicate where indentation should decrease
|
|
(object) @indent.end
|
|
|
|
(array_content) @indent.end
|