Add mongo core syntax changes.
Some of these I'll port into my new central file arrangements.
This commit is contained in:
@ -8,7 +8,7 @@ else
|
||||
endif
|
||||
|
||||
syn match cxxObjects "\<[A-Z][A-Za-z0-9_]*[a-z][A-Za-z0-9_]*\>"
|
||||
syn match cxxMetaFunction "\<[a-z][a-z0-9]*_[a-z0-9_]*[a-z0-9]\>"
|
||||
"syn match cxxMetaFunction "\<[a-z][a-z0-9]*_[a-z0-9_]*[a-z0-9]\>"
|
||||
|
||||
syn keyword cppType noexcept decltype
|
||||
|
||||
@ -19,8 +19,7 @@ syn keyword cppStatement static_assert
|
||||
|
||||
syn keyword cxxConstants nullptr
|
||||
|
||||
syn match cxxConstants "\<C::[A-Za-z_][A-Z_a-z0-9]*\>"
|
||||
syn match cxxConstants "\<k[A-Z][A-Za-z_][A-Z_a-z0-9]*\>"
|
||||
syn match cxxConstants "\<\(C::[A-Za-z_]\|k[A-Z]\)[A-Z_a-z0-9]*\>"
|
||||
|
||||
syn keyword cxxExceptionNames Exception Exceptions
|
||||
syn match cxxExceptionNames "\<[A-Z][A-Za-z0-9_]*Exception\>"
|
||||
@ -44,13 +43,17 @@ syn match cxxStlConstant "\(std::\)\@<=\(endl\|flush\)\>"
|
||||
|
||||
syn match cxxStlKeywords "\(\<std::\)\@<=string\>"
|
||||
syn match cxxStlKeywords "\(\<std::\)\@<=mutex\>"
|
||||
syn match cxxStlKeywords "\(std::\)\@<=\(unique\|shared\|weak\)_ptr\(<\)\@="
|
||||
" syn match cxxStlTypes "\(std::\)\@<=\(vector\|array\|deque\|list\|pair\|\(priority_\)\?queue\|stack\|\(unordered_\)\?\(multi\)\?\(set\|map\)\)\(<\|;\| \)\@="
|
||||
syn match cxxStlKeywords "\(std::\)\@<=\(unique_ptr\)\(<\|;\| \|\>\)\@="
|
||||
syn match cxxStlKeywords "\(std::\)\@<=\(shared_ptr\)\(<\|;\| \|\>\)\@="
|
||||
syn match cxxStlKeywords "\(std::\)\@<=\(weak_ptr\)\(<\|;\| \|\>\)\@="
|
||||
syn match cxxStlKeywords "\(std::\)\@<=nullptr_t\>"
|
||||
syn match cxxStlKeywords "\(std::\)\@<=function\>"
|
||||
|
||||
syn match cxxStlFunctions "\(std::\)\@<=make_\(unique\|shared\)\(<\)\@="
|
||||
syn match cxxStlFunctions "\(std::\)\@<=make_\(pair\|tuple\)\((\|<\)\@="
|
||||
|
||||
syn match cxxStlFunctions "\(std::\)\@<=addressof\((\)\@="
|
||||
syn match cxxStlFunctions "\(std::\)\@<=tie\((\)\@="
|
||||
syn match cxxStlFunctions "\(std::\)\@<=copy\(_\(n\|backward\|if\)\)\?\((\)\@="
|
||||
syn match cxxStlFunctions "\(std::\)\@<=find\(_\(if\|first_of\|end\)\?\)\((\)\@="
|
||||
@ -122,6 +125,7 @@ if version >= 508 || !exists("did_cxx_syntax_inits")
|
||||
HiLink cxxStlFunctions cppStatement
|
||||
HiLink cxxStlPrefix Caller
|
||||
HiLink cxxStlTraits MetaFunction
|
||||
HiLink cxxMetaFunction MetaFunction
|
||||
|
||||
HiLink cxxStlDangerousFunction Dangerous
|
||||
|
||||
|
||||
@ -1 +1,40 @@
|
||||
syn keyword doxygenParam contained tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
|
||||
|
||||
syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueCommentWhite,doxygenTODO,doxygenSpecial,doxygenOtherTags,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell,doxygenFixedWidth
|
||||
|
||||
syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contains=doxygenFixedWidth skipwhite keepend matchgroup=xxx
|
||||
|
||||
" Permit Ticked parameters
|
||||
syn match doxygenParamName contained +`[A-Za-z0-9_:]\+`+ nextgroup=doxygenSpecialMultilineDesc,doxygenSpecialSingleLineDesc
|
||||
|
||||
" Too Recursive
|
||||
" syn al @cxxInDoxygen syntax/cpp.vim
|
||||
|
||||
" Make all C++ code in a doxygen block look kinda like natural C++
|
||||
"syn match doxygenSpecialMultilineDesc "`"
|
||||
|
||||
syn match doxygenCommentPreprocHighlight " \+\* " contained
|
||||
|
||||
syn region doxygenFixedWidth matchgroup=Comment start=+`+ skip=+ * + end=+`+ contained contains=cxxObjects,cxxMetaFunction,cxxConstants,cppStatement,cxxExceptionNames,cxxErrorNames,cxxCast,cxxStlPrefix,cxxStlTypes,cxxStlService,cxxStlKeywords,cxxStlFunctions,cxxStlTraits,cxxStlExceptionNames,cxxStlDangerousFunction,cppAccess,cppModifier,cppType,cppExceptions,cppOperator,cppCast,cppStorageClass,cppStructure,cppBoolean,cppConstant,cppModifier,cppRawString,cppNumber,cppRawStringDelimiter,cStatement,cLabel,cRepeat,cTodo,cBadContinuation,cSpecial,cFormat,cString,cCppString,cCppSkip,cStringGroup,cCharacter,cSpecialCharacter,cBlock,cParenGroup,cParen,cCppParen,cBadBlock,cNumber,cNumbers,cNumbersCom,cOctal,cOctalZero,cFloat,cOctalError,cCommentSkip,cCommentL,cCommentString,cComment2String,cComment,cOperator,cStatement,cStructure,cStorageClass,cConstant,cBitField,cUserCont,cPreProcGroup,doxygenCommentPreprocHighlight,cDefine,cNamedConstant
|
||||
|
||||
"syn region doxygenFixedWidth start=+`+ skip=+ * + end=+`+ contained contains=@cxx,@cpp
|
||||
|
||||
syn region doxygenFixedWidth start=+\~\~\~+ skip=+ * + end=+\~\~\~+ contained contains=cxxObjects,cxxMetaFunction,cxxConstants,cppStatement,cxxExceptionNames,cxxErrorNames,cxxCast,cxxStlPrefix,cxxStlTypes,cxxStlService,cxxStlKeywords,cxxStlFunctions,cxxStlTraits,cxxStlExceptionNames,cxxStlDangerousFunction,cppAccess,cppModifier,cppType,cppExceptions,cppOperator,cppCast,cppStorageClass,cppStructure,cppBoolean,cppConstant,cppModifier,cppRawString,cppNumber,cppRawStringDelimiter,cStatement,cLabel,cRepeat,cTodo,cBadContinuation,cSpecial,cFormat,cString,cCppString,cCppSkip,cStringGroup,cCharacter,cSpecialCharacter,cBlock,cParenGroup,cParen,cCppParen,cBadBlock,cNumber,cNumbers,cNumbersCom,cOctal,cOctalZero,cFloat,cOctalError,cCommentSkip,cCommentL,cCommentString,cComment2String,cComment,cOperator,cStatement,cStructure,cStorageClass,cConstant,cBitField,cUserCont,cPreProc,cPreProcGroup,doxygenCommentPreprocHighlight,cDefine,cNamedConstant
|
||||
|
||||
"syn region doxygenFixedWidth start=+\~\~\~+ skip=+ * + end=+\~\~\~+ contained contains=@cxx,@cpp
|
||||
|
||||
"syn match doxygenFixedWidth +`.\+`+ contained
|
||||
|
||||
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,doxygenFixedWidth,@doxygenHtmlGroup,@Spell skipwhite keepend
|
||||
syn region doxygenSpecialSingleLineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenOtherTags,doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenFixedWidth,doxygenHashLink,@doxygenHtmlGroup,doxygenTODO,@Spell skipwhite keepend
|
||||
|
||||
"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 doxygenOtherTags doxygenOther
|
||||
hi link doxygenSpecialSingleLineDesc doxygenSpecialMultilineDesc
|
||||
hi link doxygenCommentPreprocHighlight PreProc
|
||||
|
||||
Reference in New Issue
Block a user