-
Notifications
You must be signed in to change notification settings - Fork 407
end } on \SI commands with ^ is highlighted as texGroupError #2167
Copy link
Copy link
Closed
Labels
Description
Description
First of all, thank you for this wonderful package! I just have a small cosmetic bug to file—the closing bracket on \SI commands, when the command has a ^ in it, is highlighted as texGroupError despite being valid syntax.
Steps to reproduce
Minimal vimrc:
call plug#begin('~/.local/share/nvim/plugged')
Plug 'lervag/vimtex'
" interestingly enough, the above line does make a difference!
call plug#end()The following .tex file shows the behavior for me:
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage{siunitx}
\begin{document}
\begin{gather*}
c = \SI{299792458}{m.s^{-1}}
\end{gather*}
\end{document}Expected behavior
No response
Actual behavior
See below; the last } on line 9 is highlighted despite being perfectly valid syntax.

One weird thing is that if I remove the Plug 'lervag/vimtex' from my vimrc, the highlighting error shifts to the ^, which is now highlighted with texOnlyMath:

Do you use a latexmkrc file?
No
VimtexInfo
System info
OS: Arch Linux
Vim version: NVIM v0.5.0
Has clientserver: true
Servername: /tmp/nvimg3cv04/0
VimTeX project: test
base: test.tex
root: /home/imyxh/git/wesleyan-courses/ASTR155/hw1
tex: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.tex
out: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.pdf
log: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.log
aux: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.aux
fls: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.fls
main parser: current file verified
compiler: latexmk
configuration:
continuous: 1
callback: 1
latexmk options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
latexmk engine: -pdf
job: 5
pid: 3960288
cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -e '$pdf_previewer = "evince"' -e '$success_cmd = "echo vimtex_compiler_callback_success"' -e '$failure_cmd = "echo vimtex_compiler_callback_failure"' 'test.tex'
viewer: General
qf: LaTeX logfile
root: /home/imyxh/git/wesleyan-courses/ASTR155/hw1
addqflist: 57
errorformat_saved:
fix_paths: 58
main: /home/imyxh/git/wesleyan-courses/ASTR155/hw1/test.tex
set_errorformat: 56
document class: article
packages:
amsbsy
amsgen
amsmath
amsopn
amstext
array
expl3
keyval
l3keys2e
siunitx
translator
xparse
xparse-2020-10-01Reactions are currently unavailable