Skip to content

minor vim syntax highlighting improvements #6495

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions src/etc/vim/after/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ syn match rustRightArrowHead contained ">" conceal cchar= 
syn match rustRightArrowTail contained "-" conceal cchar=⟶
syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail

syn match rustLeftRightArrowHead contained ">" conceal cchar= 
syn match rustLeftRightArrowTail contained "<-" conceal cchar=⟷
syn match rustNiceOperator "<->" contains=rustLeftRightArrowHead,rustLeftRightArrowTail

syn match rustFatRightArrowHead contained ">" conceal cchar= 
syn match rustFatRightArrowTail contained "=" conceal cchar=⟹
syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrowTail
Expand Down
6 changes: 3 additions & 3 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ syn keyword rustOperator as

syn keyword rustKeyword break copy do drop extern
syn keyword rustKeyword for if impl let log
syn keyword rustKeyword copy do drop extern
syn keyword rustKeyword copy do extern
syn keyword rustKeyword for impl let log
syn keyword rustKeyword loop mod once priv pub
syn keyword rustKeyword return
Expand All @@ -28,8 +28,8 @@ syn keyword rustStorage const mut ref static
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained

" Reserved words
"syn keyword rustKeyword m32 m64 m128 f80 f16 f128 be " These are obsolete
" reserved
syn keyword rustKeyword be

syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
syn keyword rustType f64 i8 i16 i32 i64 str Self
Expand Down