@@ -10,17 +10,20 @@ elseif exists("b:current_syntax")
10
10
finish
11
11
endif
12
12
13
- syn match rustAssert " \< assert\(\w\) *"
14
- syn keyword rustKeyword as break
15
- syn keyword rustKeyword copy do drop else extern
13
+ syn keyword rustConditional match if else
14
+ syn keyword rustOperator as
15
+
16
+ syn keyword rustKeyword break copy do drop extern
16
17
syn keyword rustKeyword for if impl let log
17
- syn keyword rustKeyword loop match mod once priv pub pure
18
- syn keyword rustKeyword ref return static
18
+ syn keyword rustKeyword copy do drop extern
19
+ syn keyword rustKeyword for impl let log
20
+ syn keyword rustKeyword loop mod once priv pub
21
+ syn keyword rustKeyword return
19
22
syn keyword rustKeyword unsafe use while
20
23
" FIXME: Scoped impl's name is also fallen in this category
21
24
syn keyword rustKeyword mod trait struct enum type nextgroup =rustIdentifier skipwhite
22
25
syn keyword rustKeyword fn nextgroup =rustFuncName skipwhite
23
- syn keyword rustStorage const mut
26
+ syn keyword rustStorage const mut ref static
24
27
25
28
syn match rustIdentifier contains =rustIdentifierPrime " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
26
29
syn match rustFuncName " \% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *" display contained
@@ -71,8 +74,8 @@ syn keyword rustConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO
71
74
syn match rustModPath " \w\(\w\) *::[^<]" he =e - 3 ,me =e - 3
72
75
syn match rustModPathSep " ::"
73
76
74
- syn match rustFuncCall " \w\(\w\) *(" he =e - 1 ,me =e - 1 contains = rustAssert
75
- syn match rustFuncCall " \w\(\w\) *::<" he =e - 3 ,me =e - 3 contains = rustAssert " foo::<T>();
77
+ syn match rustFuncCall " \w\(\w\) *(" he =e - 1 ,me =e - 1
78
+ syn match rustFuncCall " \w\(\w\) *::<" he =e - 3 ,me =e - 3 " foo::<T>();
76
79
77
80
syn match rustMacro ' \w\(\w\) *!'
78
81
syn match rustMacro ' #\w\(\w\) *'
@@ -110,8 +113,7 @@ syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8
110
113
syn region rustComment start =" /\* " end =" \* /" contains =rustComment,rustTodo
111
114
syn region rustComment start =" //" skip =" \\ $" end =" $" contains =rustTodo keepend
112
115
113
-
114
- syn keyword rustTodo TODO FIXME XXX NB unsafe
116
+ syn keyword rustTodo contained TODO FIXME XXX NB
115
117
116
118
hi def link rustHexNumber rustNumber
117
119
hi def link rustBinNumber rustNumber
@@ -126,8 +128,9 @@ hi def link rustBoolean Boolean
126
128
hi def link rustConstant Constant
127
129
hi def link rustSelf Constant
128
130
hi def link rustFloat Float
129
- hi def link rustAssert Keyword
131
+ hi def link rustOperator Operator
130
132
hi def link rustKeyword Keyword
133
+ hi def link rustConditional Conditional
131
134
hi def link rustIdentifier Identifier
132
135
hi def link rustModPath Include
133
136
hi def link rustFuncName Function
@@ -140,7 +143,6 @@ hi def link rustStorage StorageClass
140
143
hi def link rustLifetime Special
141
144
142
145
" Other Suggestions:
143
- " hi rustAssert ctermfg=yellow
144
146
" hi rustMacro ctermfg=magenta
145
147
146
148
syn sync minlines =200
0 commit comments