aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-02-05 10:10:18 -0800
committerChristian Clason <c.clason@uni-graz.at>2024-02-06 10:29:09 +0100
commit127cf25737300c7cd5ea74d387576008a9eafe2a (patch)
tree9b09d71491fa31430282d2fc51aa0a657fbee7d6 /tests/query/highlights
parentfix(latex): give comments higher precedence (diff)
downloadnvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar.gz
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar.bz2
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar.lz
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar.xz
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.tar.zst
nvim-treesitter-127cf25737300c7cd5ea74d387576008a9eafe2a.zip
feat(latex): pre-compiled header highlights, tests
Also moves comment highlights to the very end to make them more future-proof.
Diffstat (limited to 'tests/query/highlights')
-rw-r--r--tests/query/highlights/latex/test.tex33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/query/highlights/latex/test.tex b/tests/query/highlights/latex/test.tex
new file mode 100644
index 000000000..9e65b900a
--- /dev/null
+++ b/tests/query/highlights/latex/test.tex
@@ -0,0 +1,33 @@
+% vim:ft=latex
+% !TeX
+% ^ @keyword.directive
+%& filename
+% ^ @keyword.directive
+ \begin{equation} \frac{4}{2} + 128 \text{hello} \sum_{n=1}^{\text{hi\_hi\^hi}} n \end{equation}
+% ^ @markup.math ^ @none ^ @function
+
+\begin{equation}
+ a = b % Comment here
+% ^ @comment
+% ^ @markup.math
+\end{equation}
+\begin{equation}
+ a = b % Comment here
+% ^ @comment
+ b = c
+\end{equation}
+\text{
+hi $here$ is some text % with a comment
+% ^ @comment
+% ^ @markup.math
+}
+\textbf{
+here is some text $5 + 2$ % with a comment
+% ^ @comment
+% ^ @markup.math
+}
+\textit{
+here is some text $5 + 2$ % with a comment
+% ^ @comment
+% ^ @markup.math
+}