-
Notifications
You must be signed in to change notification settings - Fork 407
minted environment is not detected #2142
Copy link
Copy link
Closed
Labels
Description
Description
When minted block has additional options like breaklines it is not detected and not highlighted by vimtex.
Steps to reproduce
vim -u minimal.vim minimum.tex- check syntax highlighting of the minted block
minimal.vim
set nocompatible
let &runtimepath = '~/.vim/bundle/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/bundle/vimtex/after'
filetype plugin indent on
syntax enable
let g:vimtex_compiler_latexrun_engines = {'_': 'lualatex'}
let g:vimtex_compiler_latexmk_engines = {'_': '-lualatex'}
let g:vimtex_compiler_latexmk = {
\ 'options' : [
\ '-shell-escape',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],
\}
let g:vimtex_syntax_packages = {'minted': {'load': 2}}minimal.tex
\documentclass{minimal}
\begin{document}
\begin{minted}[breaklines]{python}
import numpy as np
def incmatrix(genl1,genl2):
m = len(genl1)
n = len(genl2)
M = None #to become the incidence matrix
VT = np.zeros((n*m,1), int) #dummy variable
\end{minted}
\end{document}
Expected behavior
Minted block is highlighted:
Actual behavior
Minted block is not highlighted:
Do you use a latexmkrc file?
No
VimtexInfo
System info
OS: Microsoft Windows 10 Pro (10.0.19041 N/A Build 19041)
Vim version: VIM 8.2 (1-3360)
Has clientserver: true
Servername: GVIM1
VimTeX project: minimal
base: minimal.tex
root: C:\Users\maksim.kim\temp
tex: C:\Users\maksim.kim\temp\minimal.tex
out:
log:
aux:
fls:
main parser: current file verified
compiler: latexmk
configuration:
continuous: 1
callback: 1
latexmk options:
-shell-escape
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
latexmk engine: -lualatex
viewer: General
qf: LaTeX logfile
addqflist: 70
fix_paths: 71
set_errorformat: 69
document class: minimalReactions are currently unavailable

