Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion autoload/vimtex/syntax/core.vim
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,15 @@ function! vimtex#syntax#core#init_rules() abort " {{{1
endif
endif

" }}}2
" {{{2 Commands: \begin{macrocode}

" * In documented TeX Format, the 'macrocode' environment separates
" documentation from actual code, hence should get special highlighting.
if expand('%:e') ==# 'dtx'
syntax match texDtxMacrocode "\%#=2^% \{4}\\\(begin\|end\){macrocode}"
endif

" }}}2

let b:current_syntax = 'tex'
Expand Down Expand Up @@ -770,7 +779,6 @@ function! vimtex#syntax#core#init_rules() abort " {{{1
\texMathDelimMod,
\texMathDelim,
\@NoSpell

endfunction

" }}}1
Expand Down Expand Up @@ -830,6 +838,7 @@ function! vimtex#syntax#core#init_highlights() abort " {{{1
" See :help group-name for list of conventional group names

" Primitive TeX highlighting groups
highlight def link texDtxMacrocode Special
highlight def link texArg Include
highlight def link texCmd Statement
highlight def link texCmdSpaceCodeChar Special
Expand Down