diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index f811fbf585542..87f4059716b35 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -10,17 +10,20 @@ elseif exists("b:current_syntax") finish endif -syn match rustAssert "\(); +syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1 +syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::(); syn match rustMacro '\w\(\w\)*!' syn match rustMacro '#\w\(\w\)*' @@ -110,8 +113,7 @@ syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8 syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend - -syn keyword rustTodo TODO FIXME XXX NB unsafe +syn keyword rustTodo contained TODO FIXME XXX NB hi def link rustHexNumber rustNumber hi def link rustBinNumber rustNumber @@ -126,8 +128,9 @@ hi def link rustBoolean Boolean hi def link rustConstant Constant hi def link rustSelf Constant hi def link rustFloat Float -hi def link rustAssert Keyword +hi def link rustOperator Operator hi def link rustKeyword Keyword +hi def link rustConditional Conditional hi def link rustIdentifier Identifier hi def link rustModPath Include hi def link rustFuncName Function @@ -140,7 +143,6 @@ hi def link rustStorage StorageClass hi def link rustLifetime Special " Other Suggestions: -" hi rustAssert ctermfg=yellow " hi rustMacro ctermfg=magenta syn sync minlines=200