blob: bd48666bc93b3ac4cf30a7366ca0e00cd21b95d1 [file] [log] [blame]
Bram Moolenaar3c2881d2017-03-21 19:18:29 +01001" 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
7if exists('current_compiler')
8 finish
9endif
10runtime compiler/rustc.vim
11let current_compiler = "cargo"
12
13let s:save_cpo = &cpo
14set cpo&vim
15
16if exists(':CompilerSet') != 2
17 command -nargs=* CompilerSet setlocal <args>
18endif
19
20if exists('g:cargo_makeprg_params')
21 execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
22else
23 CompilerSet makeprg=cargo\ $*
24endif
25
26" Ignore general cargo progress messages
27CompilerSet 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
34let &cpo = s:save_cpo
35unlet s:save_cpo