From d89d698c26edcb5468731beae858a7fe40ab052c Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Thu, 13 May 2021 22:51:15 +0200 Subject: [PATCH] highlights(latex): add more math environments Fix #1293 --- queries/latex/highlights.scm | 14 +++----------- 1 file 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)[*]?$"))