-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.xml
134 lines (112 loc) · 9.79 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tree-sitter on Emacs Tree-sitter</title>
<link>https://emacs-tree-sitter.github.io/</link>
<description>Recent content in Tree-sitter on Emacs Tree-sitter</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language><atom:link href="https://emacs-tree-sitter.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Installation</title>
<link>https://emacs-tree-sitter.github.io/installation/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/installation/</guid>
<description>tree-sitter requires Emacs 25.1 or above, built with dynamic module support. Some Emacs distributions have this disabled by default. To check whether your Emacs has dynamic module support enabled, try evaluating one of these:
(functionp &#39;module-load) ; should be t module-file-suffix ; should be non-nil Upon byte compilation and first load, the package tree-sitter (tsc) will try to obtain the dynamic module using 2 mechanisms:
Downloading a pre-compiled binary from GitHub.</description>
</item>
<item>
<title>Getting Started</title>
<link>https://emacs-tree-sitter.github.io/getting-started/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/getting-started/</guid>
<description>The minor mode tree-sitter-mode provides a buffer-local syntax tree, which is kept up-to-date with changes to the buffer&rsquo;s text.
It can be toggled in a buffer by the command tree-sitter-mode, or enabled through major mode hooks:
(add-hook &#39;rust-mode-hook #&#39;tree-sitter-mode) To enable it for all supported major modes:
(global-tree-sitter-mode) For the full list of supported major modes, check the variable tree-sitter-major-mode-language-alist.
Turn on Syntax Highlighting Run M-x tree-sitter-hl-mode to replace the regex-based highlighting provided by font-lock-mode with tree-based syntax highlighting.</description>
</item>
<item>
<title>Languages</title>
<link>https://emacs-tree-sitter.github.io/languages/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/languages/</guid>
<description>A language object defines how to parse a particular programming language. It is usually dynamically loaded from a shared library (.dylib, .so, .dll).
The variable tree-sitter-load-path is a list of directories that the function tree-sitter-require uses to search for these shared libraries. This is similar to how the built-in function require searches for Emacs libraries on load-path. The default value contains the directory used by the tree-sitter CLI tool.
;; Load the language definition for Rust, if it hasn&#39;t been loaded.</description>
</item>
<item>
<title>Queries</title>
<link>https://emacs-tree-sitter.github.io/syntax-highlighting/queries/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/syntax-highlighting/queries/</guid>
<description>A query is a set of patterns, written in a Lisp-like syntax.
Queries are language-specific. Different language grammars use different node types and field names. Examples in this section apply to Rust.
Patterns A pattern is an S-expression (Lisp form), optionally preceded by a field name, suffixed with a quantifier, and/or followed by a capture name.
A node form is a list form whose first element is a symbol (except for the special symbols, described later).</description>
</item>
<item>
<title>Customization</title>
<link>https://emacs-tree-sitter.github.io/syntax-highlighting/customization/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/syntax-highlighting/customization/</guid>
<description>Theming tree-sitter-hl-mode provides a richer set of faces than font-lock-mode. For example, function definitions are highlighted with tree-sitter-hl-face:function, while function calls are highlighted with tree-sitter-hl-face:function.call. However, for compatibility with existing themes, the default values for most of these faces inherit from built-in font-lock faces.
If you want to leverage the full power of Tree-sitter&rsquo;s syntax highlighting approach, you should customize these faces.
Face Mappings By default, when the highlighting query associates a node with CAPTURE-NAME, it will be highlighted with the face tree-sitter-hl-face:CAPTURE-NAME.</description>
</item>
<item>
<title>Interface for Modes</title>
<link>https://emacs-tree-sitter.github.io/syntax-highlighting/interface-for-modes/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/syntax-highlighting/interface-for-modes/</guid>
<description>Major modes that want to integrate with tree-sitter-hl-mode should set the variable tree-sitter-hl-default-patterns. It plays a similar role to font-lock-defaults.
Minor modes that want to customize syntax highlighting should call the function tree-sitter-hl-add-patterns. It plays a similar role to font-lock-add-keywords.
The language bundle tree-sitter-langs provides highlighting queries for several languages. These queries will be used when the corresponding major modes do not set tree-sitter-hl-default-patterns.
</description>
</item>
<item>
<title>Parsing</title>
<link>https://emacs-tree-sitter.github.io/api/parsing/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/api/parsing/</guid>
<description>The minor mode tree-sitter-mode provides the high-level interface for working with an up-to-date buffer-local syntax tree. Writing a Dependent Minor Mode is recommended over directly using the low level parsing APIs below.
Parsing is done through stateful parser objects.
tsc-make-parser Create a new parser without setting a language. tsc-set-language parser language Set a parser&rsquo;s active language. tsc-parse-string parser string Parse a single string of source code. This is useful for quick, one-off parsing needs.</description>
</item>
<item>
<title>Inspecting</title>
<link>https://emacs-tree-sitter.github.io/api/inspecting/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/api/inspecting/</guid>
<description>If your code works with a large number of nodes, consider using the traversal APIs, which are more efficient.
The result of parsing is a syntax tree of the entire source code (string, buffer). It contains syntax nodes that indicate the structure of the source code. Tree-sitter provides APIs to inspect and traverse this structure, but does not support modifying it directly (for the purposes of source code transformation or generation).</description>
</item>
<item>
<title>Walking</title>
<link>https://emacs-tree-sitter.github.io/api/walking/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/api/walking/</guid>
<description>Tree-walking functions enable efficient traversal of the syntax tree.
When dealing with a large number of nodes, working with node objects creates a huge pressure on the garbage collector. For better performance, it&rsquo;s advisable to extract and work with individual node properties. The constant tsc-valid-node-props holds the list of all available property names:
&#39;(:type :field ;node&#39;s field name within the parent node :depth ;node&#39;s depth, relative to the iterator&#39;s start :named-p :extra-p :error-p :missing-p :has-error-p :start-byte :end-byte :start-point :end-point :range :byte-range) Functions that accept a vector of property names can also accept a single property name, in which case only that property is returned/yielded, instead of a vector of properties.</description>
</item>
<item>
<title>Querying</title>
<link>https://emacs-tree-sitter.github.io/api/querying/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/api/querying/</guid>
<description>Tree-sitter provides a Lisp-like query language to search for patterns in the syntax tree.
tsc-make-query language patterns [tag-assigner] Create a new query for the given language. This query cannot be run on syntax nodes of other languages. Patterns can be specified as either a sequence (usually a vector, for convenience) of S-expressions, or their textual representations, concatenated into a string.
When the query is executed, each captured node is tagged with a symbol, whose name is the corresponding capture name defined in patterns.</description>
</item>
<item>
<title>Tree-sitter Minor Mode</title>
<link>https://emacs-tree-sitter.github.io/tree-sitter-mode/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://emacs-tree-sitter.github.io/tree-sitter-mode/</guid>
<description>tree-sitter-mode is a minor mode that provides a buffer-local up-to-date syntax tree.
TODO: Write this.
Hook: tree-sitter-after-on-hook Hook: tree-sitter-after-first-parse-hook Hook: tree-sitter-after-change-functions Variable: tree-sitter-major-mode-language-alist Variable: tree-sitter-language Variable: tree-sitter-tree Function: tree-sitter-node-at-pos [node-type] [pos] Writing a Dependent Minor Mode See the docstring of tree-sitter--handle-dependent.</description>
</item>
</channel>
</rss>