Skip to content

Commit

Permalink
Make existential a contextual keyword
Browse files Browse the repository at this point in the history
Thanks @dlrobertson who let me use his PR
rust-lang#284!
  • Loading branch information
hcpl committed Nov 29, 2018
1 parent 8c513bd commit bb9a237
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipe
syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained
syn match rustUnionContextual /\<union\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*/ transparent contains=rustUnion
syn keyword rustOperator as
syn keyword rustExistential existential nextgroup=rustTypedef skipwhite skipempty contained
syn match rustExistentialContextual /\<existential\_s\+type/ transparent contains=rustExistential,rustTypedef

syn match rustAssert "\<assert\(\w\)*!" contained
syn match rustPanic "\<panic\(\w\)*!" contained
Expand All @@ -29,7 +31,6 @@ syn keyword rustKeyword break
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
syn keyword rustKeyword continue
syn keyword rustKeyword crate
syn keyword rustKeyword existential
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
syn keyword rustKeyword in impl let
Expand Down Expand Up @@ -293,6 +294,7 @@ hi def link rustDynKeyword rustKeyword
hi def link rustTypedef Keyword " More precise is Typedef, but it doesn't feel right for Rust
hi def link rustStructure Keyword " More precise is Structure
hi def link rustUnion rustStructure
hi def link rustExistential rustKeyword
hi def link rustPubScopeDelim Delimiter
hi def link rustPubScopeCrate rustKeyword
hi def link rustSuper rustKeyword
Expand Down

0 comments on commit bb9a237

Please sign in to comment.