annotate runtime/compiler/cargo.vim @ 34080:034445b3af10 v9.1.0009

patch 9.1.0009: Cannot easily get the list of matches Commit: https://github.com/vim/vim/commit/f93b1c881a99fa847a1bafa71877d7e16f18e6ef Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Jan 4 22:28:46 2024 +0100 patch 9.1.0009: Cannot easily get the list of matches Problem: Cannot easily get the list of matches Solution: Add the matchstrlist() and matchbufline() Vim script functions (Yegappan Lakshmanan) closes: #13766 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 04 Jan 2024 22:45:03 +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: