Files
cshenv/vim/after/syntax/doxygen.vim
ADAM David Alan Martin f33ebf8b32 Fixup the c-inclusion params a bit.
The overly greedy blue-comment star matcher would make all C and C++
code in doxygen look good, but it messes with non-doxygen block comments.
By changing to this `containedin` blocking, we pickup the trailing
`)` and `}` characters that seem to be skipped if just doing the
ticked-region contained requirement.
2018-08-24 11:25:01 -04:00

36 lines
1.5 KiB
VimL

syn keyword doxygenParam contained tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
" Permit Ticked parameters
if exists("b:current_syntax")
unlet b:current_syntax
endif
syn match blueCommentStar "^[ ]*\*" containedin=doxygenFixedWidth,cBlock,cParen,cppParen
" Make all C++ code in a doxygen block look kinda like natural C++
"syn match doxygenSpecialMultilineDesc "`"
syn cluster doxyNestedCXX contains=@cxxInDoxygen
syn cluster doxyNeedsFixedWidth contains=doxygenBody,doxygenSpecialMultilineDesc,doxygenBriefLine,doxygenBrief
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+@code+ skip=+^\n+ keepend end=+@endcode+ contains=@doxyNestedCXX
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+\~\~\~+ skip=+^\n+ end=+\~\~\~+ contains=@doxyNestedCXX
syn region doxygenFixedWidth containedin=@doxyNeedsFixedWidth matchgroup=Comment start=+`+ end=+`+ keepend contains=@doxyNestedCXX
"syn match doxygenFixedWidth +`.\+`+ contained
"syn keyword doxygenOther contained : nextgroup=doxygenSpecialMultilineDesc skipwhite
"syn match doxygenMagic
" +\(\<[npcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
hi link doxygenFixedWidth None
hi link blueCommentStar doxygenSpecialContinueComment