Mercurial > vim
annotate runtime/compiler/cargo.vim @ 35237:7361f7682670 default tip
runtime(termdebug): check for gdb file/dir before using as buffer name
Commit: https://github.com/vim/vim/commit/62ccaa60d5f7f9a13c758bd5e55b7ca6855a6de9
Author: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Date: Tue May 21 23:33:03 2024 +0200
runtime(termdebug): check for gdb file/dir before using as buffer name
Add test so that this doesn't regress.
fixes: #12718
closes: #14792
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 21 May 2024 23:45:03 +0200 |
parents | 99bf06d67e43 |
children |
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 |
34784
99bf06d67e43
runtime: Remove more fallback :CompilerSet definitions from compiler plugins (#14413)
Christian Brabandt <cb@256bit.org>
parents:
34778
diff
changeset
|
5 " 2024 Apr 05 by The Vim Project (removed :CompilerSet definition) |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " 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
|
7 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 if exists('current_compiler') |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
9 finish |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 endif |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 runtime compiler/rustc.vim |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 let current_compiler = "cargo" |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
14 " vint: -ProhibitAbbreviationOption |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 let s:save_cpo = &cpo |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 set cpo&vim |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
17 " vint: +ProhibitAbbreviationOption |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 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
|
20 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
|
21 else |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
22 CompilerSet makeprg=cargo\ $* |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 endif |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
25 augroup RustCargoQuickFixHooks |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
26 autocmd! |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
27 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
|
28 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
|
29 augroup END |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
30 |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 " Ignore general cargo progress messages |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 CompilerSet errorformat+= |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
33 \%-G%\\s%#Downloading%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
34 \%-G%\\s%#Checking%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
35 \%-G%\\s%#Compiling%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
36 \%-G%\\s%#Finished%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
37 \%-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
|
38 \%-G%\\s%#To\ learn\ more\\,%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
39 \%-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
|
40 \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#, |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
41 \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
43 " vint: -ProhibitAbbreviationOption |
11229
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 let &cpo = s:save_cpo |
146a1e213b60
Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 unlet s:save_cpo |
33255
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
46 " vint: +ProhibitAbbreviationOption |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
47 |
555fede66c30
runtime(rust): sync rust runtime files with upstream (#13075)
Christian Brabandt <cb@256bit.org>
parents:
11229
diff
changeset
|
48 " vim: set et sw=4 sts=4 ts=8: |