From c012f55efda29f09179e921cf148d79deb57616e Mon Sep 17 00:00:00 2001 From: Nick Shipp Date: Sun, 7 May 2017 09:04:01 -0400 Subject: Much maturering of vim configs --- vim/bundle/rust.vim/after/syntax/rust.vim | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 vim/bundle/rust.vim/after/syntax/rust.vim (limited to 'vim/bundle/rust.vim/after') diff --git a/vim/bundle/rust.vim/after/syntax/rust.vim b/vim/bundle/rust.vim/after/syntax/rust.vim new file mode 100644 index 0000000..b0f7e62 --- /dev/null +++ b/vim/bundle/rust.vim/after/syntax/rust.vim @@ -0,0 +1,34 @@ +if !exists('g:rust_conceal') || g:rust_conceal == 0 || !has('conceal') || &enc != 'utf-8' + finish +endif + +" For those who don't want to see `::`... +if exists('g:rust_conceal_mod_path') && g:rust_conceal_mod_path != 0 + syn match rustNiceOperator "::" conceal cchar=ㆍ +endif + +syn match rustRightArrowHead contained ">" conceal cchar=  +syn match rustRightArrowTail contained "-" conceal cchar=⟶ +syn match rustNiceOperator "->" contains=rustRightArrowHead,rustRightArrowTail + +syn match rustFatRightArrowHead contained ">" conceal cchar=  +syn match rustFatRightArrowTail contained "=" conceal cchar=⟹ +syn match rustNiceOperator "=>" contains=rustFatRightArrowHead,rustFatRightArrowTail + +syn match rustNiceOperator /\<\@!_\(_*\>\)\@=/ conceal cchar=′ + +" For those who don't want to see `pub`... +if exists('g:rust_conceal_pub') && g:rust_conceal_pub != 0 + syn match rustPublicSigil contained "pu" conceal cchar=* + syn match rustPublicRest contained "b" conceal cchar=  + syn match rustNiceOperator "pub " contains=rustPublicSigil,rustPublicRest +endif + +hi link rustNiceOperator Operator + +if !(exists('g:rust_conceal_mod_path') && g:rust_conceal_mod_path != 0) + hi! link Conceal Operator + + " And keep it after a colorscheme change + au ColorScheme hi! link Conceal Operator +endif -- cgit v1.2.3-70-g09d2