nvim-treesitter/queries/toon/indents.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

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