File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 15
15
" Syntax definitions {{{1
16
16
" Basic keywords {{{2
17
17
syn keyword rustConditional match if else
18
- syn keyword rustRepeat for loop while
18
+ syn keyword rustRepeat loop while
19
+ " `:syn match` must be used to prioritize highlighting `for` keyword.
20
+ syn match rustRepeat / \< for\> /
21
+ " Highlight `for` keyword in `impl ... for ... {}` statement. This line must
22
+ " be put after previous `syn match` line to overwrite it.
23
+ syn match rustKeyword / \% (\< impl\> .\+\)\@ <=\< for\> /
19
24
syn keyword rustTypedef type nextgroup =rustIdentifier skipwhite skipempty
20
25
syn keyword rustStructure struct enum nextgroup =rustIdentifier skipwhite skipempty
21
26
syn keyword rustUnion union nextgroup =rustIdentifier skipwhite skipempty contained
You can’t perform that action at this time.
0 commit comments