Skip to content

Commit

Permalink
Add .await syntax highlighting (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar authored and chris-morgan committed Jul 22, 2019
1 parent de998a2 commit 4c27b51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ syn match rustExistentialContextual /\<existential\_s\+type/ transparent contain

syn match rustAssert "\<assert\(\w\)*!" contained
syn match rustPanic "\<panic\(\w\)*!" contained
syn match rustKeyword "\<async\%(\s\|\n\)\@="
syn match rustAsync "\<async\%(\s\|\n\)\@="
syn keyword rustKeyword break
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
syn keyword rustKeyword continue
Expand All @@ -45,7 +45,8 @@ syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
" FIXME: Scoped impl's name is also fallen in this category
syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipempty
syn keyword rustStorage move mut ref static const
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/
syn keyword rustAwait await

syn keyword rustPubScopeCrate crate contained
syn match rustPubScopeDelim /[()]/ contained
Expand Down Expand Up @@ -344,6 +345,8 @@ hi def link rustExternCrate rustKeyword
hi def link rustObsoleteExternMod Error
hi def link rustBoxPlacementParens Delimiter
hi def link rustQuestionMark Special
hi def link rustAsync rustKeyword
hi def link rustAwait rustKeyword

" Other Suggestions:
" hi rustAttribute ctermfg=cyan
Expand Down

0 comments on commit 4c27b51

Please sign in to comment.