comparison runtime/compiler/cargo.vim @ 11229:146a1e213b60

Update runtime files. Add Rust support. commit https://github.com/vim/vim/commit/3c2881dc1195f53ebafc387378399ddd6cb677a7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 21 19:18:29 2017 +0100 Update runtime files. Add Rust support.
author Christian Brabandt <cb@256bit.org>
date Tue, 21 Mar 2017 19:30:06 +0100
parents
children 555fede66c30
comparison
equal deleted inserted replaced
11228:641b98249145 11229:146a1e213b60
1 " Vim compiler file
2 " Compiler: Cargo Compiler
3 " Maintainer: Damien Radtke <damienradtke@gmail.com>
4 " Latest Revision: 2014 Sep 24
5 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
6
7 if exists('current_compiler')
8 finish
9 endif
10 runtime compiler/rustc.vim
11 let current_compiler = "cargo"
12
13 let s:save_cpo = &cpo
14 set cpo&vim
15
16 if exists(':CompilerSet') != 2
17 command -nargs=* CompilerSet setlocal <args>
18 endif
19
20 if exists('g:cargo_makeprg_params')
21 execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
22 else
23 CompilerSet makeprg=cargo\ $*
24 endif
25
26 " Ignore general cargo progress messages
27 CompilerSet errorformat+=
28 \%-G%\\s%#Downloading%.%#,
29 \%-G%\\s%#Compiling%.%#,
30 \%-G%\\s%#Finished%.%#,
31 \%-G%\\s%#error:\ Could\ not\ compile\ %.%#,
32 \%-G%\\s%#To\ learn\ more\\,%.%#
33
34 let &cpo = s:save_cpo
35 unlet s:save_cpo