blob: b3c80919872bae76032ce13729c59f3c2ed27aa0 [file] [log] [blame]
Bram Moolenaar3c2881d2017-03-21 19:18:29 +01001" Vim compiler file
2" Compiler: Rust Compiler
3" Maintainer: Chris Morgan <me@chrismorgan.info>
Gregory Andersfc935942023-09-12 13:23:38 -05004" Latest Revision: 2023-09-11
Bram Moolenaar3c2881d2017-03-21 19:18:29 +01005" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
6
7if exists("current_compiler")
Gregory Andersfc935942023-09-12 13:23:38 -05008 finish
Bram Moolenaar3c2881d2017-03-21 19:18:29 +01009endif
10let current_compiler = "rustc"
11
Gregory Andersfc935942023-09-12 13:23:38 -050012" vint: -ProhibitAbbreviationOption
13let s:save_cpo = &cpo
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010014set cpo&vim
Gregory Andersfc935942023-09-12 13:23:38 -050015" vint: +ProhibitAbbreviationOption
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010016
Gregory Andersfc935942023-09-12 13:23:38 -050017if get(g:, 'rustc_makeprg_no_percent', 0)
18 CompilerSet makeprg=rustc
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010019else
Gregory Andersfc935942023-09-12 13:23:38 -050020 if has('patch-7.4.191')
21 CompilerSet makeprg=rustc\ \%:S
22 else
23 CompilerSet makeprg=rustc\ \"%\"
24 endif
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010025endif
26
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010027" New errorformat (after nightly 2016/08/10)
Gregory Andersfc935942023-09-12 13:23:38 -050028CompilerSet errorformat=
29 \%-G,
30 \%-Gerror:\ aborting\ %.%#,
31 \%-Gerror:\ Could\ not\ compile\ %.%#,
32 \%Eerror:\ %m,
33 \%Eerror[E%n]:\ %m,
34 \%Wwarning:\ %m,
35 \%Inote:\ %m,
36 \%C\ %#-->\ %f:%l:%c,
37 \%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z
Bram Moolenaar3c2881d2017-03-21 19:18:29 +010038
Gregory Andersfc935942023-09-12 13:23:38 -050039" Old errorformat (before nightly 2016/08/10)
40CompilerSet errorformat+=
41 \%f:%l:%c:\ %t%*[^:]:\ %m,
42 \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m,
43 \%-G%f:%l\ %s,
44 \%-G%*[\ ]^,
45 \%-G%*[\ ]^%*[~],
46 \%-G%*[\ ]...
47
48" vint: -ProhibitAbbreviationOption
49let &cpo = s:save_cpo
50unlet s:save_cpo
51" vint: +ProhibitAbbreviationOption
52
53" vim: set et sw=4 sts=4 ts=8: