Skip to content

Commit afbf908

Browse files
committed
Update a handful of keywords highlighted in Vim.
I added a few and removed a few and corrected a couple, all with reference to the prelude. It ends up a slightly arbitrary decision precisely what ends up in and what doesn't, unfortunately.
1 parent 15f05dc commit afbf908

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ syn keyword rustKeyword be yield typeof
3737

3838
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
3939
syn keyword rustType f64 i8 i16 i32 i64 str Self
40-
syn keyword rustType Option Either
40+
syn keyword rustType Option Either Result Ordering
4141

4242
" Types from libc
4343
syn keyword rustType c_float c_double c_void FILE fpos_t
@@ -48,10 +48,10 @@ syn keyword rustType size_t ptrdiff_t clock_t time_t
4848
syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4949
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
5050

51-
syn keyword rustTrait Const Copy Send Owned Sized " inherent traits
52-
syn keyword rustTrait Clone Decodable Encodable IterBytes Rand ToStr
53-
syn keyword rustTrait Eq Ord TotalEq TotalOrd Num Ptr
54-
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
51+
syn keyword rustTrait Const Copy Freeze Send Owned Sized " inherent traits
52+
syn keyword rustTrait Clone DeepClone Decodable Encodable IterBytes Rand ToCStr ToStr ToStrConsume FromStr
53+
syn keyword rustTrait ApproxEq Eq Ord TotalEq TotalOrd Num Ptr Equiv
54+
syn keyword rustTrait Drop Add Sub Mul Div Rem Not Neg BitAnd BitOr
5555
syn keyword rustTrait BitXor Shl Shr Index
5656

5757
syn keyword rustSelf self
@@ -60,9 +60,7 @@ syn keyword rustBoolean true false
6060
syn keyword rustConstant Some None " option
6161
syn keyword rustConstant Left Right " either
6262
syn keyword rustConstant Ok Err " result
63-
syn keyword rustConstant Success Failure " task
64-
syn keyword rustConstant Cons Nil " list
65-
" syn keyword rustConstant empty node " tree
63+
syn keyword rustConstant Less Equal Greater " Ordering
6664

6765
" Constants from libc
6866
syn keyword rustConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX

0 commit comments

Comments
 (0)