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

15 lines
426 B
Scheme

; locals.scm - Local scope and reference queries for TOON
; Used for features like go-to-definition, scope highlighting
; Each object creates a new scope
(object) @local.scope
; Keys define local names within their scope
(pair
key: (key) @local.definition)
; Array declarations define names
(array_declaration
key: (key) @local.definition)
; Field names in tabular arrays are definitions
(field_name) @local.definition