annotate runtime/compiler/cargo.vim @ 34500:4da97f213d15 v9.1.0156

patch 9.1.0156: Make 'wfb' failing to split still report E1513 Commit: https://github.com/vim/vim/commit/769eb2d0c3614f9ea6fffa82329558f1a4af384f Author: Sean Dewar <6256228+seandewar@users.noreply.github.com> Date: Thu Mar 7 21:37:50 2024 +0100 patch 9.1.0156: Make 'wfb' failing to split still report E1513 Problem: may not be clear why failing to split causes an ":Xdo" command to abort if 'wfb' is set. Solution: do not return immediately if win_split fails, so E1513 is still given. Expect both errors in the test. Also fix tests to pass CI. (Sean Dewar) closes: #14152 Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 07 Mar 2024 21:45:09 +0100
parents 555fede66c30
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: