Tree queries in the grammars repositories’ queries folders.įor an example of the language-specific files, see the package.json file and queries directory in the tree-sitter-ruby repository.Language configuration in grammar repositories’ package.json files.Per-user configuration in ~/.config/tree-sitter/config.json.In order to run syntax highlighting from the command-line, three types of files are needed: OverviewĪll of the files needed to highlight a given language are normally included in the same git repository as the Tree-sitter grammar for that language (for example, tree-sitter-javascript, tree-sitter-ruby). If you are using tree-sitter-highlight library (either from C or from Rust), all of these concepts are still applicable, but the configuration data is provided using in-memory objects, rather than files. ![]() This document explains how the Tree-sitter syntax highlighting system works, using the command line interface. You can also perform syntax highlighting at the command line using the tree-sitter highlight command. Tree-sitter has built-in support for syntax highlighting, via the tree-sitter-highlight library, which is currently used on for highlighting code written in several languages. ![]() Syntax highlighting is a very common feature in applications that deal with code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |