Skip to content

Commit d47faf7

Browse files
committed
---
yaml --- r: 22909 b: refs/heads/master c: ba82240 h: refs/heads/master i: 22907: ece77a6 v: v3
1 parent 17c69b9 commit d47faf7

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 507fba57d1bb82589b22f23ae9dbe8abcee18286
2+
refs/heads/master: ba822402ded9821f4e9edfd8e07f1e32a3994497
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
if exists('g:no_rust_conceal') || !has('conceal') || &enc != 'utf-8'
2+
finish
3+
endif
4+
5+
" For those who don't want to see `::`...
6+
if exists('g:rust_conceal_mod_path')
7+
syn match rustNiceOperator "::" conceal cchar=
8+
endif
9+
10+
syn match rustLeftArrowHead contained "-" conceal cchar= 
11+
syn match rustLeftArrowTail contained "<" conceal cchar=
12+
syn match rustNiceOperator "<-" contains=rustLeftArrowHead,rustLeftArrowTail
13+
14+
syn match rustRightArrowHead contained ">" conceal cchar= 
15+
syn match rustRightArrowTail contained "-" conceal cchar=
16+
syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail
17+
18+
syn match rustLeftRightArrowHead contained ">" conceal cchar= 
19+
syn match rustLeftRightArrowTail contained "<-" conceal cchar=
20+
syn match rustNiceOperator "<->" contains=rustLeftRightArrowHead,rustLeftRightArrowTail
21+
22+
syn match rustFatRightArrowHead contained ">" conceal cchar= 
23+
syn match rustFatRightArrowTail contained "=" conceal cchar=
24+
syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrowTail
25+
26+
syn match rustNiceOperator /\<\@!_\(_*\>\)\@=/ conceal cchar=
27+
28+
hi link rustNiceOperator Operator
29+
hi! link Conceal Operator
30+
setlocal conceallevel=2

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo ke
103103

104104
syn keyword rustTodo TODO FIXME XXX NB
105105

106-
" For those who don't want to see `::`...
107-
syn match rustModPathSep "::" conceal cchar=
108-
109-
syn match rustArrowHead contained ">" conceal cchar= 
110-
syn match rustArrowTail contained "-" conceal cchar=
111-
syn match rustArrowFull "->" contains=rustArrowHead,rustArrowTail
112-
113-
syn match rustFatArrowHead contained ">" conceal cchar= 
114-
syn match rustFatArrowTail contained "=" conceal cchar=
115-
syn match rustFatArrowFull "=>" contains=rustFatArrowHead,rustFatArrowTail
116-
117-
syn match rustIdentifierPrime /\<\@!_\(_*\>\)\@=/ conceal cchar=
118-
119106
hi def link rustHexNumber rustNumber
120107
hi def link rustBinNumber rustNumber
121108
hi def link rustIdentifierPrime rustIdentifier
@@ -136,7 +123,7 @@ hi def link rustMacro Macro
136123
hi def link rustType Type
137124
hi def link rustTodo Todo
138125
hi def link rustAttribute PreProc
139-
hi def link rustModPathSep Conceal
126+
140127
" Other Suggestions:
141128
" hi rustAssert ctermfg=yellow
142129
" hi rustMacro ctermfg=magenta

0 commit comments

Comments
 (0)