-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathlatex.scm
52 lines (44 loc) · 984 Bytes
/
latex.scm
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
;; https://github.com/latex-lsp/tree-sitter-latex/blob/master/src/grammar.json
[
(block_comment)
(line_comment)
] @comment
(command_name) @functionCallee
(part) @part
(chapter) @chapter
(section) @section
(subsection) @subSection
(subsubsection) @subSubSection
(paragraph) @namedParagraph
(subparagraph) @subParagraph
(_
(begin) @xmlStartTag @interior.start.endOf
(end) @xmlEndTag @interior.end.startOf
) @environment @xmlElement @_.domain
(_
(begin) @xmlBothTags
(#allow-multiple! @xmlBothTags)
) @_.domain
(_
(end) @xmlBothTags
(#allow-multiple! @xmlBothTags)
) @_.domain
(operator
[
"<"
">"
] @disqualifyDelimiter
)
;;!! \item one \LaTeX
;;! ^^^^^^^^^^
(
(_
(enum_item
(text) @collectionItem.start.startOf
) @collectionItem.leading.startOf @collectionItem.end.endOf
)
)
(generic_environment
(begin) @collectionItem.iteration.start.endOf
(end) @collectionItem.iteration.end.startOf
) @collectionItem.iteration.domain