diff options
| author | Yuan Fu | 2022-10-09 15:17:11 -0700 |
|---|---|---|
| committer | Yuan Fu | 2022-10-09 17:20:28 -0700 |
| commit | c88a1631e3f76926bf0fed49fa1b704d6eaf2155 (patch) | |
| tree | 97a012153edb415acb34271d65b4c6b8dabc8ac4 /admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html | |
| parent | 9f7c359f4023570616c9961487069ba1122a5bb0 (diff) | |
| download | emacs-c88a1631e3f76926bf0fed49fa1b704d6eaf2155.tar.gz emacs-c88a1631e3f76926bf0fed49fa1b704d6eaf2155.zip | |
Make tree-sitter font-lock support decoration levels
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
Update.
* admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html:
Update.
* doc/lispref/modes.texi: Mention the new :level option.
* lisp/treesit.el (treesit-font-lock-settings): Update docstring.
(treesit-font-lock-rules): Support :level. Relayout the let form.
(treesit-font-lock-fontify-region): Support :level.
Diffstat (limited to 'admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html')
| -rw-r--r-- | admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html b/admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html index 7b6e51468a6..81b42f7f526 100644 --- a/admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html +++ b/admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html | |||
| @@ -94,6 +94,10 @@ for this Emacs instance. | |||
| 94 | see <a href="Parser_002dbased-Font-Lock.html">Parser-based Font Lock</a>, <a href="Parser_002dbased-Indentation.html">Parser-based Indentation</a>, and | 94 | see <a href="Parser_002dbased-Font-Lock.html">Parser-based Font Lock</a>, <a href="Parser_002dbased-Indentation.html">Parser-based Indentation</a>, and |
| 95 | <a href="List-Motion.html">Moving over Balanced Expressions</a>. | 95 | <a href="List-Motion.html">Moving over Balanced Expressions</a>. |
| 96 | </p> | 96 | </p> |
| 97 | <p>About naming convention: use “tree-sitter” when referring to it as a | ||
| 98 | noun, like <code>python-use-tree-sitter</code>, but use “treesit” for | ||
| 99 | prefixes, like <code>python-treesit-indent-function</code>. | ||
| 100 | </p> | ||
| 97 | <p>To access the syntax tree of the text in a buffer, we need to first | 101 | <p>To access the syntax tree of the text in a buffer, we need to first |
| 98 | load a language definition and create a parser with it. Next, we can | 102 | load a language definition and create a parser with it. Next, we can |
| 99 | query the parser for specific nodes in the syntax tree. Then, we can | 103 | query the parser for specific nodes in the syntax tree. Then, we can |