diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-26 12:44:31 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-26 12:44:31 +0200 |
commit | 90d87abd3051c5acf15bc352c9f51f18e23b7095 (patch) | |
tree | bf13d90559fdbfeeb7cf79cb0c2e04edfeed7443 /after/syntax | |
parent | d6710f1b578ee233e92d1810fdb3e5c9fba651f7 (diff) | |
download | vim-polyglot-90d87abd3051c5acf15bc352c9f51f18e23b7095.tar.gz vim-polyglot-90d87abd3051c5acf15bc352c9f51f18e23b7095.zip |
Add Rust lang support
Diffstat (limited to 'after/syntax')
-rw-r--r-- | after/syntax/rust.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/after/syntax/rust.vim b/after/syntax/rust.vim new file mode 100644 index 00000000..1ab8394e --- /dev/null +++ b/after/syntax/rust.vim @@ -0,0 +1,33 @@ +if !exists('g:rust_conceal') || !has('conceal') || &enc != 'utf-8' + finish +endif + +" For those who don't want to see `::`... +if exists('g:rust_conceal_mod_path') + 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') + 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') + hi! link Conceal Operator +endif + +setlocal conceallevel=2 |