Skip to content

Commit 00201c9

Browse files
committed
vim: use StorageClass for mut and const
1 parent 1c3cca8 commit 00201c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ endif
1212

1313
syn match rustAssert "\<assert\(\w\)*"
1414
syn keyword rustKeyword as break
15-
syn keyword rustKeyword const copy do drop else extern fail
15+
syn keyword rustKeyword copy do drop else extern fail
1616
syn keyword rustKeyword for if impl let log
17-
syn keyword rustKeyword loop match mod move mut once priv pure
17+
syn keyword rustKeyword loop match mod move once priv pure
1818
syn match rustKeyword "\<pub\>"
1919
syn keyword rustKeyword ref return static
2020
syn keyword rustKeyword unsafe use while
2121
" FIXME: Scoped impl's name is also fallen in this category
2222
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
2323
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
24+
syn keyword rustStorage const mut
2425

2526
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
2627
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
@@ -133,6 +134,7 @@ hi def link rustMacro Macro
133134
hi def link rustType Type
134135
hi def link rustTodo Todo
135136
hi def link rustAttribute PreProc
137+
hi def link rustStorage StorageClass
136138

137139
" Other Suggestions:
138140
" hi rustAssert ctermfg=yellow

0 commit comments

Comments
 (0)