- Building Emacs with tree-sitter
- Install language definitions
- Setup
+- Naming convention
- Font-lock
- Indent
- Imenu
(treesit-can-enable-p))
#+end_src
+* Naming convention
+
+When referring to tree-sitter as a noun, use “tree-sitter”, like
+python-use-tree-sitter. For prefix use “treesit”, like
+python-treesit-indent.
+
* Font-lock
Tree-sitter works like this: You provide a query made of patterns and
@pxref{Parser-based Font Lock}, @ref{Parser-based Indentation}, and
@ref{List Motion}.
+About naming convention: use ``tree-sitter'' when referring to it as a
+noun, like @code{python-use-tree-sitter}, but use ``treesit'' for
+prefixes, like @code{python-treesit-indent-function}.
+
To access the syntax tree of the text in a buffer, we need to first
load a language definition and create a parser with it. Next, we can
query the parser for specific nodes in the syntax tree. Then, we can