Skip to content

Commit add8a85

Browse files
committed
Vim: Stop highlighting foo in use foo; specially
This wasn’t really consistent with other things; the last section of the import was not highlighted in any other case. Also `use {foo, bar};` was having the foo and bar not highlighted, where they would have been as separate statements.
1 parent 36d0346 commit add8a85

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ syn keyword rustKeyword for in if impl let
2727
syn keyword rustKeyword loop once proc pub
2828
syn keyword rustKeyword return super
2929
syn keyword rustKeyword unsafe virtual where while
30-
syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty
30+
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
3131
" FIXME: Scoped impl's name is also fallen in this category
3232
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
3333
syn keyword rustStorage mut ref static const
@@ -131,9 +131,7 @@ syn keyword rustBoolean true false
131131
" If foo::bar changes to foo.bar, change this ("::" to "\.").
132132
" If foo::bar changes to Foo::bar, change this (first "\w" to "\u").
133133
syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3
134-
syn match rustModPathInUse "\w\(\w\)*" contained " only for 'use path;'
135134
syn match rustModPathSep "::"
136-
" rustModPathInUse is split out from rustModPath so that :syn-include can get the group list right.
137135

138136
syn match rustFuncCall "\w\(\w\)*("he=e-1,me=e-1
139137
syn match rustFuncCall "\w\(\w\)*::<"he=e-3,me=e-3 " foo::<T>();
@@ -252,7 +250,6 @@ hi def link rustReservedKeyword Error
252250
hi def link rustConditional Conditional
253251
hi def link rustIdentifier Identifier
254252
hi def link rustCapsIdent rustIdentifier
255-
hi def link rustModPathInUse rustModPath
256253
hi def link rustModPath Include
257254
hi def link rustModPathSep Delimiter
258255
hi def link rustFunction Function

0 commit comments

Comments
 (0)