robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Yinzuo Jiangvim-patch:cec44eae82c1 (#28199)fe0f1f1c19

master
1.5 KiB48 linesraw
1" Vim compiler file
2" Compiler:         Cargo Compiler
3" Maintainer:       Damien Radtke <damienradtke@gmail.com>
4" Latest Revision:  2023-09-11
5"                   2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
6" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
7
8if exists('current_compiler')
9    finish
10endif
11runtime compiler/rustc.vim
12let current_compiler = "cargo"
13
14" vint: -ProhibitAbbreviationOption
15let s:save_cpo = &cpo
16set cpo&vim
17" vint: +ProhibitAbbreviationOption
18
19if exists('g:cargo_makeprg_params')
20    execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
21else
22    CompilerSet makeprg=cargo\ $*
23endif
24
25augroup RustCargoQuickFixHooks
26    autocmd!
27    autocmd QuickFixCmdPre make call cargo#quickfix#CmdPre()
28    autocmd QuickFixCmdPost make call cargo#quickfix#CmdPost()
29augroup END
30
31" Ignore general cargo progress messages
32CompilerSet errorformat+=
33            \%-G%\\s%#Downloading%.%#,
34            \%-G%\\s%#Checking%.%#,
35            \%-G%\\s%#Compiling%.%#,
36            \%-G%\\s%#Finished%.%#,
37            \%-G%\\s%#error:\ Could\ not\ compile\ %.%#,
38            \%-G%\\s%#To\ learn\ more\\,%.%#,
39            \%-G%\\s%#For\ more\ information\ about\ this\ error\\,%.%#,
40            \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#,
41            \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c
42
43" vint: -ProhibitAbbreviationOption
44let &cpo = s:save_cpo
45unlet s:save_cpo
46" vint: +ProhibitAbbreviationOption
47
48" vim: set et sw=4 sts=4 ts=8: