comparison runtime/compiler/cargo.vim @ 33255:555fede66c30

runtime(rust): sync rust runtime files with upstream (#13075) Commit: https://github.com/vim/vim/commit/fc93594d562dbbd9da03c89754538f91efd0c7ca Author: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue Sep 12 13:23:38 2023 -0500 runtime(rust): sync rust runtime files with upstream (https://github.com/vim/vim/issues/13075) Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Tue, 12 Sep 2023 20:30:07 +0200
parents 146a1e213b60
children e1df51f68736
comparison
equal deleted inserted replaced
33254:d4a558720faf 33255:555fede66c30
1 " Vim compiler file 1 " Vim compiler file
2 " Compiler: Cargo Compiler 2 " Compiler: Cargo Compiler
3 " Maintainer: Damien Radtke <damienradtke@gmail.com> 3 " Maintainer: Damien Radtke <damienradtke@gmail.com>
4 " Latest Revision: 2014 Sep 24 4 " Latest Revision: 2023-09-11
5 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim 5 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
6 6
7 if exists('current_compiler') 7 if exists('current_compiler')
8 finish 8 finish
9 endif 9 endif
10 runtime compiler/rustc.vim 10 runtime compiler/rustc.vim
11 let current_compiler = "cargo" 11 let current_compiler = "cargo"
12 12
13 " vint: -ProhibitAbbreviationOption
13 let s:save_cpo = &cpo 14 let s:save_cpo = &cpo
14 set cpo&vim 15 set cpo&vim
16 " vint: +ProhibitAbbreviationOption
15 17
16 if exists(':CompilerSet') != 2 18 if exists(':CompilerSet') != 2
17 command -nargs=* CompilerSet setlocal <args> 19 command -nargs=* CompilerSet setlocal <args>
18 endif 20 endif
19 21
20 if exists('g:cargo_makeprg_params') 22 if exists('g:cargo_makeprg_params')
21 execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' 23 execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
22 else 24 else
23 CompilerSet makeprg=cargo\ $* 25 CompilerSet makeprg=cargo\ $*
24 endif 26 endif
27
28 augroup RustCargoQuickFixHooks
29 autocmd!
30 autocmd QuickFixCmdPre make call cargo#quickfix#CmdPre()
31 autocmd QuickFixCmdPost make call cargo#quickfix#CmdPost()
32 augroup END
25 33
26 " Ignore general cargo progress messages 34 " Ignore general cargo progress messages
27 CompilerSet errorformat+= 35 CompilerSet errorformat+=
28 \%-G%\\s%#Downloading%.%#, 36 \%-G%\\s%#Downloading%.%#,
29 \%-G%\\s%#Compiling%.%#, 37 \%-G%\\s%#Checking%.%#,
30 \%-G%\\s%#Finished%.%#, 38 \%-G%\\s%#Compiling%.%#,
31 \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, 39 \%-G%\\s%#Finished%.%#,
32 \%-G%\\s%#To\ learn\ more\\,%.%# 40 \%-G%\\s%#error:\ Could\ not\ compile\ %.%#,
41 \%-G%\\s%#To\ learn\ more\\,%.%#,
42 \%-G%\\s%#For\ more\ information\ about\ this\ error\\,%.%#,
43 \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#,
44 \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c
33 45
46 " vint: -ProhibitAbbreviationOption
34 let &cpo = s:save_cpo 47 let &cpo = s:save_cpo
35 unlet s:save_cpo 48 unlet s:save_cpo
49 " vint: +ProhibitAbbreviationOption
50
51 " vim: set et sw=4 sts=4 ts=8: