From 29d7ff53512b0b85598f9f8167c5c255fa37c1aa Mon Sep 17 00:00:00 2001 From: Frankie Robertson Date: Tue, 16 Feb 2016 20:37:58 +0200 Subject: [PATCH] Add lualatex highlighting --- after/syntax/tex.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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