Overview of Tree-sitter syntax highlighting requirements
Tree-sitter provides syntax highlighting via the tree-sitter-highlight library or the tree-sitter highlight CLI command. To perform highlighting from the command line, three components are required:
- Per-user configuration: located at
~/.config/tree-sitter/config.json. - Language configuration: defined in the grammar repository's
tree-sitter.jsonfile. - Tree queries: located in the grammar repository's
queriesfolder.