mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
parent
6863f79118
commit
ea8c3b2850
3 changed files with 121 additions and 1 deletions
|
|
@ -81,7 +81,7 @@
|
||||||
"revision": "48bfb38abd93f8d617877d7bb7f92a6bb1166285"
|
"revision": "48bfb38abd93f8d617877d7bb7f92a6bb1166285"
|
||||||
},
|
},
|
||||||
"latex": {
|
"latex": {
|
||||||
"revision": "e87bc36487bba70f492cf5810f44a5484f883c32"
|
"revision": "ea43db6830632fd3531b9cbc34a93502b0d4339a"
|
||||||
},
|
},
|
||||||
"ledger": {
|
"ledger": {
|
||||||
"revision": "609d5e5ab5955823b3faeaec8d2afc91860c639a"
|
"revision": "609d5e5ab5955823b3faeaec8d2afc91860c639a"
|
||||||
|
|
|
||||||
10
queries/latex/folds.scm
Normal file
10
queries/latex/folds.scm
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[
|
||||||
|
(chapter)
|
||||||
|
(section)
|
||||||
|
(subsection)
|
||||||
|
(subsubsection)
|
||||||
|
(paragraph)
|
||||||
|
(subparagraph)
|
||||||
|
|
||||||
|
(environment)
|
||||||
|
] @fold
|
||||||
110
queries/latex/highlights.scm
Normal file
110
queries/latex/highlights.scm
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
[
|
||||||
|
(generic_command_name)
|
||||||
|
"\\begin"
|
||||||
|
"\\end"
|
||||||
|
"\\newcommand"
|
||||||
|
"\\renewcommand"
|
||||||
|
"\\DeclareRobustCommand"
|
||||||
|
] @function.macro
|
||||||
|
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
(bracket_group) @parameter
|
||||||
|
|
||||||
|
[(math_operator) "="] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
"\\usepackage"
|
||||||
|
"\\documentclass"
|
||||||
|
"\\input"
|
||||||
|
"\\subfile"
|
||||||
|
"\\subfileinclude"
|
||||||
|
"\\subfileinclude"
|
||||||
|
"\\includegraphics"
|
||||||
|
"\\addbibresource"
|
||||||
|
"\\bibliography"
|
||||||
|
"\\includesvg"
|
||||||
|
"\\includeinkscape"
|
||||||
|
"\\usepgflibrary"
|
||||||
|
"\\usetikzlibrary"
|
||||||
|
] @include
|
||||||
|
|
||||||
|
[
|
||||||
|
"\\chapter"
|
||||||
|
"\\section"
|
||||||
|
"\\subsection"
|
||||||
|
"\\subsubsection"
|
||||||
|
"\\paragraph"
|
||||||
|
"\\subparagraph"
|
||||||
|
] @type
|
||||||
|
|
||||||
|
[
|
||||||
|
(label_definition)
|
||||||
|
(label_reference)
|
||||||
|
(equation_label_reference)
|
||||||
|
(label_number)
|
||||||
|
] @label
|
||||||
|
|
||||||
|
(key_val_pair
|
||||||
|
key: (_) @parameter
|
||||||
|
value: (_))
|
||||||
|
|
||||||
|
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
|
(chapter
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
(section
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
(subsection
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
(subsubsection
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
(paragraph
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
(subparagraph
|
||||||
|
text: (brace_group) @text.title)
|
||||||
|
|
||||||
|
((environment
|
||||||
|
(begin
|
||||||
|
name: (word) @_frame)
|
||||||
|
(brace_group
|
||||||
|
child: (text) @text.title))
|
||||||
|
(#eq? @_frame "frame"))
|
||||||
|
|
||||||
|
((generic_command
|
||||||
|
name:(generic_command_name) @_name
|
||||||
|
arg: (brace_group
|
||||||
|
(text) @text.title))
|
||||||
|
(#eq? @_name "\\frametitle"))
|
||||||
|
|
||||||
|
;; Formatting
|
||||||
|
|
||||||
|
((generic_command
|
||||||
|
name:(generic_command_name) @_name
|
||||||
|
arg: (_) @text.emphasis)
|
||||||
|
(#eq? @_name "\\emph"))
|
||||||
|
|
||||||
|
((generic_command
|
||||||
|
name:(generic_command_name) @_name
|
||||||
|
arg: (_) @text.emphasis)
|
||||||
|
(#match? @_name "^(\\textit|\\mathit)$"))
|
||||||
|
|
||||||
|
((generic_command
|
||||||
|
name:(generic_command_name) @_name
|
||||||
|
arg: (_) @text.strong)
|
||||||
|
(#match? @_name "^(\\textbf|\\mathbf)$"))
|
||||||
|
|
||||||
|
(ERROR) @error
|
||||||
|
|
||||||
|
;; Controversial
|
||||||
|
; Add @text.bullet?
|
||||||
|
"\\item" @punctuation.special
|
||||||
|
|
||||||
|
;; Math (TODO)
|
||||||
|
;(displayed_equation)
|
||||||
|
;(inline_formula)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue