Skip to content

Update the Vim syntax prelude. #19125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 27 additions & 32 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
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