annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim compiler file
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Compiler: Cargo Compiler
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Damien Radtke <damienradtke@gmail.com>
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
4 " Latest Revision: 2023-09-11
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 if exists('current_compiler')
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
8 finish
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endif
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 runtime compiler/rustc.vim
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 let current_compiler = "cargo"
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
13 " vint: -ProhibitAbbreviationOption
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 let s:save_cpo = &cpo
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 set cpo&vim
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
16 " vint: +ProhibitAbbreviationOption
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 if exists(':CompilerSet') != 2
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
19 command -nargs=* CompilerSet setlocal <args>
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 endif
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 if exists('g:cargo_makeprg_params')
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
23 execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 else
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
25 CompilerSet makeprg=cargo\ $*
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 endif
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
28 augroup RustCargoQuickFixHooks
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
29 autocmd!
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
30 autocmd QuickFixCmdPre make call cargo#quickfix#CmdPre()
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
31 autocmd QuickFixCmdPost make call cargo#quickfix#CmdPost()
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
32 augroup END
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
33
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 " Ignore general cargo progress messages
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 CompilerSet errorformat+=
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
36 \%-G%\\s%#Downloading%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
37 \%-G%\\s%#Checking%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
38 \%-G%\\s%#Compiling%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
39 \%-G%\\s%#Finished%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
40 \%-G%\\s%#error:\ Could\ not\ compile\ %.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
41 \%-G%\\s%#To\ learn\ more\\,%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
42 \%-G%\\s%#For\ more\ information\ about\ this\ error\\,%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
43 \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#,
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
44 \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
46 " vint: -ProhibitAbbreviationOption
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 let &cpo = s:save_cpo
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 unlet s:save_cpo
33255
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
49 " vint: +ProhibitAbbreviationOption
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
50
555fede66c30 runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
51 " vim: set et sw=4 sts=4 ts=8: