2017-11-06 16:46:08 -07:00
|
|
|
" Vim compiler file
|
|
|
|
" Compiler: Rust Compiler
|
|
|
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
2023-09-12 13:30:02 -07:00
|
|
|
" Latest Revision: 2023-09-11
|
2017-11-06 16:46:08 -07:00
|
|
|
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
|
|
|
|
|
|
|
if exists("current_compiler")
|
2023-09-12 13:30:02 -07:00
|
|
|
finish
|
2017-11-06 16:46:08 -07:00
|
|
|
endif
|
|
|
|
let current_compiler = "rustc"
|
|
|
|
|
2023-09-12 13:30:02 -07:00
|
|
|
" vint: -ProhibitAbbreviationOption
|
|
|
|
let s:save_cpo = &cpo
|
2017-11-06 16:46:08 -07:00
|
|
|
set cpo&vim
|
2023-09-12 13:30:02 -07:00
|
|
|
" vint: +ProhibitAbbreviationOption
|
2017-11-06 16:46:08 -07:00
|
|
|
|
2023-09-12 13:30:02 -07:00
|
|
|
if get(g:, 'rustc_makeprg_no_percent', 0)
|
|
|
|
CompilerSet makeprg=rustc
|
2017-11-06 16:46:08 -07:00
|
|
|
else
|
2023-09-12 13:30:02 -07:00
|
|
|
if has('patch-7.4.191')
|
|
|
|
CompilerSet makeprg=rustc\ \%:S
|
|
|
|
else
|
|
|
|
CompilerSet makeprg=rustc\ \"%\"
|
|
|
|
endif
|
2017-11-06 16:46:08 -07:00
|
|
|
endif
|
|
|
|
|
2023-09-12 13:30:02 -07:00
|
|
|
" New errorformat (after nightly 2016/08/10)
|
2017-11-06 16:46:08 -07:00
|
|
|
CompilerSet errorformat=
|
2023-09-12 13:30:02 -07:00
|
|
|
\%-G,
|
|
|
|
\%-Gerror:\ aborting\ %.%#,
|
|
|
|
\%-Gerror:\ Could\ not\ compile\ %.%#,
|
|
|
|
\%Eerror:\ %m,
|
|
|
|
\%Eerror[E%n]:\ %m,
|
|
|
|
\%Wwarning:\ %m,
|
|
|
|
\%Inote:\ %m,
|
|
|
|
\%C\ %#-->\ %f:%l:%c,
|
|
|
|
\%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z
|
2017-11-06 16:46:08 -07:00
|
|
|
|
2023-09-12 13:30:02 -07:00
|
|
|
" Old errorformat (before nightly 2016/08/10)
|
2017-11-06 16:46:08 -07:00
|
|
|
CompilerSet errorformat+=
|
2023-09-12 13:30:02 -07:00
|
|
|
\%f:%l:%c:\ %t%*[^:]:\ %m,
|
|
|
|
\%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m,
|
|
|
|
\%-G%f:%l\ %s,
|
|
|
|
\%-G%*[\ ]^,
|
|
|
|
\%-G%*[\ ]^%*[~],
|
|
|
|
\%-G%*[\ ]...
|
|
|
|
|
|
|
|
" vint: -ProhibitAbbreviationOption
|
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|
|
|
|
" vint: +ProhibitAbbreviationOption
|
|
|
|
|
|
|
|
" vim: set et sw=4 sts=4 ts=8:
|