auto merge of #15450 : chris-morgan/rust/vim-misc-2014-07-04, r=kballard
This commit is contained in:
commit
9cc39a054d
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||||
" Last Change: July 06, 2014
|
" Last Change: July 18, 2014
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
@ -38,7 +38,7 @@ syn keyword rustKeyword for in if impl let
|
|||||||
syn keyword rustKeyword loop once proc pub
|
syn keyword rustKeyword loop once proc pub
|
||||||
syn keyword rustKeyword return super
|
syn keyword rustKeyword return super
|
||||||
syn keyword rustKeyword unsafe virtual while
|
syn keyword rustKeyword unsafe virtual while
|
||||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
|
||||||
" FIXME: Scoped impl's name is also fallen in this category
|
" FIXME: Scoped impl's name is also fallen in this category
|
||||||
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
|
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
|
||||||
syn keyword rustStorage mut ref static const
|
syn keyword rustStorage mut ref static const
|
||||||
@ -60,6 +60,10 @@ syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlace
|
|||||||
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
|
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
|
||||||
" {} are handled by rustFoldBraces
|
" {} are handled by rustFoldBraces
|
||||||
|
|
||||||
|
syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
|
||||||
|
syn match rustMacroRepeatCount ".\?[*+]" contained
|
||||||
|
syn match rustMacroVariable "$\w\+"
|
||||||
|
|
||||||
" Reserved (but not yet used) keywords {{{2
|
" Reserved (but not yet used) keywords {{{2
|
||||||
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
|
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
|
||||||
|
|
||||||
@ -138,8 +142,9 @@ syn keyword rustBoolean true false
|
|||||||
" If foo::bar changes to foo.bar, change this ("::" to "\.").
|
" If foo::bar changes to foo.bar, change this ("::" to "\.").
|
||||||
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
|
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
|
||||||
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
|
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
|
||||||
syn match rustModPath "\w\(\w\)*" contained " only for 'use path;'
|
syn match rustModPathInUse "\w\(\w\)*" contained " only for 'use path;'
|
||||||
syn match rustModPathSep "::"
|
syn match rustModPathSep "::"
|
||||||
|
" rustModPathInUse is split out from rustModPath so that :syn-include can get the group list right.
|
||||||
|
|
||||||
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
|
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
|
||||||
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
|
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
|
||||||
@ -233,6 +238,9 @@ hi def link rustBinNumber rustNumber
|
|||||||
hi def link rustIdentifierPrime rustIdentifier
|
hi def link rustIdentifierPrime rustIdentifier
|
||||||
hi def link rustTrait rustType
|
hi def link rustTrait rustType
|
||||||
|
|
||||||
|
hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
|
||||||
|
hi def link rustMacroRepeatDelimiters Macro
|
||||||
|
hi def link rustMacroVariable Define
|
||||||
hi def link rustSigil StorageClass
|
hi def link rustSigil StorageClass
|
||||||
hi def link rustEscape Special
|
hi def link rustEscape Special
|
||||||
hi def link rustEscapeUnicode rustEscape
|
hi def link rustEscapeUnicode rustEscape
|
||||||
@ -255,6 +263,7 @@ hi def link rustReservedKeyword Error
|
|||||||
hi def link rustConditional Conditional
|
hi def link rustConditional Conditional
|
||||||
hi def link rustIdentifier Identifier
|
hi def link rustIdentifier Identifier
|
||||||
hi def link rustCapsIdent rustIdentifier
|
hi def link rustCapsIdent rustIdentifier
|
||||||
|
hi def link rustModPathInUse rustModPath
|
||||||
hi def link rustModPath Include
|
hi def link rustModPath Include
|
||||||
hi def link rustModPathSep Delimiter
|
hi def link rustModPathSep Delimiter
|
||||||
hi def link rustFunction Function
|
hi def link rustFunction Function
|
||||||
|
Loading…
Reference in New Issue
Block a user