Each language’s behavior for upgrade, fallback, and installation are defined by a recipe in `treesit-auto-recipe-list`. Here is an example entry for JavaScript:
,(make-treesit-auto-recipe
:lang 'typescript
:ts-mode 'typescript-ts-mode
:remap 'typescript-mode
:requires 'tsx
:url "https://github.com/tree-sitter/tree-sitter-typescript"
:revision "master"
:source-dir "typescript/src"
:ext "\\.ts\\'"):langshould exactly match the grammar name in the source repository’sgrammar.js. Look for a line like this:ts-modemust be a single quoted symbol that is the tree-sitter mode Emacs should use for this grammar:remapis either a quoted symbol or quoted list of symbols that are modes that should attempt to “switch up” to the tree-sitter major mode. When the tree-sitter grammar isn’t available, these modes are tried in order as fallback modes:requiresoptionally specifies a quoted language symbol or quoted list of symbols of any grammars that must be installed alongside this one.:urlmust specify the grammar’s source repository. Many are already listed on the tree-sitter GitHub:revisionand:source-dirare optional, but may be required if thescanner.cfile is not found under the default directory or on the default branch:ccand:c++should be left unspecified, as they are reserved for user customization:extshould be a regexp compatible withauto-mode-alist, specifying file extensions that would use this tree-sitter mode.
When submitting a pull request for a new recipe, use the title New recipe: <grammar name>,
and ensure that the patch consists only of the net-new recipe
lines, in the correct alphabetical position within treesit-auto-recipe-list.