Skip to content

Commit 8baed1f

Browse files
committed
vim - Update bblum's email address and highlight trait names
1 parent acab1cd commit 8baed1f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim syntax file
22
" Language: Rust
33
" Maintainer: Patrick Walton <[email protected]>
4-
" Maintainer: Ben Blum <bblum@mozilla.com>
4+
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
55
" Last Change: 2012 Jul 06
66

77
if version < 600
@@ -14,7 +14,7 @@ syn match rustAssert "\<assert\(\w\)*"
1414
syn keyword rustKeyword again as break
1515
syn keyword rustKeyword const copy do drop else export extern fail
1616
syn keyword rustKeyword for if impl import in let log
17-
syn keyword rustKeyword loop match mod module move mut new of owned priv pure
17+
syn keyword rustKeyword loop match mod module move mut new of priv pure
1818
syn match rustKeyword "\<pub\>"
1919
syn keyword rustKeyword ref return static to unchecked
2020
syn match rustKeyword "\<unsafe\>" " Allows also matching unsafe::foo()
@@ -42,6 +42,11 @@ syn keyword rustType size_t ptrdiff_t clock_t time_t
4242
syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4343
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4444

45+
syn keyword rustTrait Const Copy Send Owned " inherent traits
46+
syn keyword rustTrait Eq Ord Num Ptr
47+
syn keyword rustTrait Add Sub Mul Div Modulo Neg BitAnd BitOr BitXor
48+
syn keyword rustTrait Shl Shr Index
49+
4550
syn keyword rustSelf self
4651
syn keyword rustBoolean true false
4752

@@ -109,6 +114,7 @@ syn keyword rustTodo TODO FIXME XXX NB
109114
hi def link rustHexNumber rustNumber
110115
hi def link rustBinNumber rustNumber
111116
hi def link rustIdentifierPrime rustIdentifier
117+
hi def link rustTrait rustType
112118

113119
hi def link rustFormat Special
114120
hi def link rustString String

0 commit comments

Comments
 (0)