aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-05-13 22:51:15 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2021-05-17 20:36:33 +0200
commitd89d698c26edcb5468731beae858a7fe40ab052c (patch)
tree7cbe6ec32ceea322e5d759477dfa1aab62631318
parenthighlights(latex): add more commands (diff)
downloadnvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar.gz
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar.bz2
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar.lz
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar.xz
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.tar.zst
nvim-treesitter-d89d698c26edcb5468731beae858a7fe40ab052c.zip
highlights(latex): add more math environments
Fix #1293
-rw-r--r--queries/latex/highlights.scm14
1 files changed, 3 insertions, 11 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index 17300d7a8..03ca8f752 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -8,15 +8,7 @@
((environment
(begin
name: (word) @_env)) @text.math
- (#match? @_env "^(displaymath|equation|multline|eqnarray|align|array|split)[*]?$"))
-
-;; This at the beginning of the file would be the alternative to highlight
-;; only the interior of the environment
-;((environment
- ;(begin
- ;name: (word) @_env) @none
- ;(end) @none) @text.math
- ;(#match? @_env "^(displaymath|eqn|eqnarray)[*]?$"))
+ (#match? @_env "^(displaymath|equation|multline|eqnarray|align|array|split|alignat|gather|flalign)[*]?$"))
[
(generic_command_name)
@@ -380,7 +372,7 @@
(begin
name: (_) @text.environment.name
- (#not-match? @text.environment.name "^(displaymath|equation|multline|eqnarray|align|array|split)[*]?$"))
+ (#not-match? @text.environment.name "^(displaymath|equation|multline|eqnarray|align|array|split|alignat|gather|flalign)[*]?$"))
(end
name: (_) @text.environment.name
- (#not-match? @text.environment.name "^(displaymath|equation|multline|eqnarray|align|array|split)[*]?$"))
+ (#not-match? @text.environment.name "^(displaymath|equation|multline|eqnarray|align|array|split|alignat|gather|flalign)[*]?$"))