Skip to content

Commit 0eb7da7

Browse files
committed
Merge pull request #20442 from csouth3/vim-syntax
Fix vim syntax highlighting for `derive` Reviewed-by: alexcrichton
2 parents 69479e2 + c8fcbe7 commit 0eb7da7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustE
157157
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
158158
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
159159

160-
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDeriving
161-
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
160+
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
161+
syn region rustDerive start="derive(" end=")" contained contains=rustTrait
162162

163163
" Number literals
164164
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(8\|16\|32\|64\)\=\)\="
@@ -263,7 +263,7 @@ hi def link rustMacro Macro
263263
hi def link rustType Type
264264
hi def link rustTodo Todo
265265
hi def link rustAttribute PreProc
266-
hi def link rustDeriving PreProc
266+
hi def link rustDerive PreProc
267267
hi def link rustStorage StorageClass
268268
hi def link rustObsoleteStorage Error
269269
hi def link rustLifetime Special
@@ -275,7 +275,7 @@ hi def link rustBoxPlacementExpr rustKeyword
275275

276276
" Other Suggestions:
277277
" hi rustAttribute ctermfg=cyan
278-
" hi rustDeriving ctermfg=cyan
278+
" hi rustDerive ctermfg=cyan
279279
" hi rustAssert ctermfg=yellow
280280
" hi rustPanic ctermfg=red
281281
" hi rustMacro ctermfg=magenta

0 commit comments

Comments
 (0)