aboutsummaryrefslogtreecommitdiffstats
path: root/admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html
diff options
context:
space:
mode:
authorYuan Fu2022-10-09 15:17:11 -0700
committerYuan Fu2022-10-09 17:20:28 -0700
commitc88a1631e3f76926bf0fed49fa1b704d6eaf2155 (patch)
tree97a012153edb415acb34271d65b4c6b8dabc8ac4 /admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html
parent9f7c359f4023570616c9961487069ba1122a5bb0 (diff)
downloademacs-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.html4
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.
94see <a href="Parser_002dbased-Font-Lock.html">Parser-based Font Lock</a>, <a href="Parser_002dbased-Indentation.html">Parser-based Indentation</a>, and 94see <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 &ldquo;tree-sitter&rdquo; when referring to it as a
98noun, like <code>python-use-tree-sitter</code>, but use &ldquo;treesit&rdquo; for
99prefixes, 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
98load a language definition and create a parser with it. Next, we can 102load a language definition and create a parser with it. Next, we can
99query the parser for specific nodes in the syntax tree. Then, we can 103query the parser for specific nodes in the syntax tree. Then, we can