From 73f11ba2f54bfb19eb001fc4832cd3e7f862e10f Mon Sep 17 00:00:00 2001 From: Eric Toombs Date: Fri, 16 May 2025 12:55:00 +0300 Subject: latex: highlight $ $$ \[ and \( math modes properly. These math modes were being split apart by control sequence regions. To avoid this, they must be their own regions. Fixes https://github.com/mawww/kakoune/issues/5249 . Also, I got rid of an errant / in the control sequence ending regex that couldn't be right. --- rc/filetype/latex.kak | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rc/filetype/latex.kak b/rc/filetype/latex.kak index d2bf0e74..8c9a7561 100644 --- a/rc/filetype/latex.kak +++ b/rc/filetype/latex.kak @@ -34,19 +34,23 @@ provide-module latex %~ add-highlighter shared/latex regions add-highlighter shared/latex/content default-region group + +# Math modes +# $math$ must have at least one non-$ character inside. +# This is so that $$math$$ get matched properly. +add-highlighter shared/latex/dollar-math region '(?