Skip to content

Commit

Permalink
highlight 'as' like a keyword in Rust files
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchuette committed Jan 17, 2022
1 parent 9399179 commit 78ba41d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vim-config/plugins/rust.vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ syn match rustAssert "\<assert\(\w\)*!" contained
syn match rustPanic "\<panic\(\w\)*!" contained
syn match rustAsync "\<async\%(\s\|\n\)\@="
syn keyword rustKeyword break
" `as` is not a keyword but an operator in Rust. Since we disabled operator
" highlighting, we're gonna pretend as if `as` were one, though.
syn keyword rustKeyword as
syn keyword rustKeyword box
syn keyword rustKeyword continue
syn keyword rustKeyword crate
Expand Down

0 comments on commit 78ba41d

Please sign in to comment.