Skip to content

Commit

Permalink
Update the Vim syntax prelude.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-morgan committed Nov 20, 2014
1 parent bfaa7bc commit dc0416e
Showing 1 changed file with 27 additions and 32 deletions.
59 changes: 27 additions & 32 deletions src/etc/vim/syntax/rust.vim
Expand Up @@ -66,69 +66,64 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
" This section is just straight transformation of the contents of the prelude,
" to make it easy to update.

" Core operators {{{3
" Reexported core operators {{{3
syn keyword rustTrait Copy Send Sized Sync
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
syn keyword rustTrait BitAnd BitOr BitXor
syn keyword rustTrait Drop Deref DerefMut
syn keyword rustTrait Shl Shr Index IndexMut
syn keyword rustEnum Option
syn keyword rustEnumVariant Some None
syn keyword rustEnum Result
syn keyword rustEnumVariant Ok Err
syn keyword rustTrait Shl Shr
syn keyword rustTrait Index IndexMut
syn keyword rustTrait Slice SliceMut
syn keyword rustTrait Fn FnMut FnOnce

" Functions {{{3
"syn keyword rustFunction from_str
"syn keyword rustFunction range
" Reexported functions {{{3
"syn keyword rustFunction range repeat
"syn keyword rustFunction drop
"syn keyword rustFunction from_str

" Types and traits {{{3
" Reexported types and traits {{{3
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
syn keyword rustTrait IntoBytes
syn keyword rustTrait ToCStr
syn keyword rustTrait Char UnicodeChar
syn keyword rustTrait Clone
syn keyword rustTrait PartialEq PartialOrd Eq Ord Equiv
syn keyword rustEnum Ordering
syn keyword rustTrait PartialEq PartialOrd Eq Ord
syn keyword rustEnum Ordering Equiv
syn keyword rustEnumVariant Less Equal Greater
syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq
syn keyword rustTrait Set MutableSet
syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
syn keyword rustTrait FromIterator Extend ExactSize
syn keyword rustTrait Iterator DoubleEndedIterator
syn keyword rustTrait RandomAccessIterator CloneableIterator
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
syn keyword rustTrait NumCast Int SignedInt UnsignedInt Float
syn keyword rustTrait FloatMath ToPrimitive FromPrimitive
syn keyword rustTrait ToPrimitive FromPrimitive
syn keyword rustTrait Box
syn keyword rustEnum Option
syn keyword rustEnumVariant Some None
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
syn keyword rustTrait RawPtr
syn keyword rustTrait Buffer Writer Reader Seek
syn keyword rustTrait Str StrVector StrSlice
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
syn keyword rustTrait ToString IntoString
syn keyword rustTrait RawPtr RawMutPtr
syn keyword rustEnum Result
syn keyword rustEnumVariant Ok Err
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
syn keyword rustTrait Str StrVector StrPrelude
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
syn keyword rustTrait CloneableVector ImmutableCloneableVector
syn keyword rustTrait MutableCloneableSlice MutableOrdSlice
syn keyword rustTrait ImmutableSlice MutableSlice
syn keyword rustTrait ImmutablePartialEqSlice ImmutableOrdSlice
syn keyword rustTrait Slice VectorVector
syn keyword rustTrait MutableSliceAllocating
syn keyword rustTrait String
syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude
syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude
syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude
syn keyword rustTrait IntoString String ToString
syn keyword rustTrait Vec

" Reexported runtime types {{{3
"syn keyword rustFunction sync_channel channel
syn keyword rustTrait SyncSender Sender Receiver
"syn keyword rustFunction spawn

"syn keyword rustConstant GC
" Other syntax {{{2

syn keyword rustSelf self
syn keyword rustBoolean true false

" Other syntax {{{2

" If foo::bar changes to foo.bar, change this ("::" to "\.").
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
Expand Down

5 comments on commit dc0416e

@bors
Copy link
Contributor

@bors bors commented on dc0416e Nov 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at chris-morgan@dc0416e

@bors
Copy link
Contributor

@bors bors commented on dc0416e Nov 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chris-morgan/rust/vim-prelude-2014-11-20 = dc0416e into auto

@bors
Copy link
Contributor

@bors bors commented on dc0416e Nov 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris-morgan/rust/vim-prelude-2014-11-20 = dc0416e merged ok, testing candidate = acfdb14

@bors
Copy link
Contributor

@bors bors commented on dc0416e Nov 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on dc0416e Nov 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = acfdb14

Please sign in to comment.