diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index e92703f..8daf61d 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -112,6 +112,24 @@ syntax region texZone \ contains=texBeginEnd,@DOT let b:current_syntax = 'tex' +" }}}1 +" {{{1 Nested syntax highlighting for lualatex +unlet b:current_syntax +syntax include @LUA syntax/lua.vim +syntax region texZone + \ start='\\begin{luacode\*\?}'rs=s + \ end='\\end{luacode\*\?}'re=e + \ keepend + \ transparent + \ contains=texBeginEnd,@LUA +syntax region texZone + \ start='\\\(directlua\|luadirect\){'rs=s + \ end='}'re=e + \ keepend + \ transparent + \ contains=texBeginEnd,@LUA +let b:current_syntax = 'tex' + " }}}1 " {{{1 Nested syntax highlighting for minted