Skip to content

Commit

Permalink
Highlight $(…)* and $foo in Vim.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-morgan committed Jul 21, 2014
1 parent f15d6d2 commit ca6ffac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/etc/vim/syntax/rust.vim
Expand Up @@ -60,6 +60,10 @@ syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlace
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
" {} are handled by rustFoldBraces

syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount
syn match rustMacroRepeatCount ".\?[*+]" contained
syn match rustMacroVariable "$\w\+"

" Reserved (but not yet used) keywords {{{2
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield

Expand Down Expand Up @@ -233,6 +237,9 @@ hi def link rustBinNumber rustNumber
hi def link rustIdentifierPrime rustIdentifier
hi def link rustTrait rustType

hi def link rustMacroRepeatCount rustMacroRepeatDelimiters
hi def link rustMacroRepeatDelimiters Macro
hi def link rustMacroVariable Define
hi def link rustSigil StorageClass
hi def link rustEscape Special
hi def link rustEscapeUnicode rustEscape
Expand Down

0 comments on commit ca6ffac

Please sign in to comment.