vim-polyglot/compiler/rustc.vim

58 lines
1.5 KiB
VimL
Raw Permalink Normal View History

if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'rust') != -1
finish
endif
2013-09-26 06:44:31 -04:00
" Vim compiler file
" Compiler: Rust Compiler
" Maintainer: Chris Morgan <me@chrismorgan.info>
" Latest Revision: 2013 Jul 12
2017-09-27 13:57:29 -04:00
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
2013-09-26 06:44:31 -04:00
if exists("current_compiler")
2018-07-08 09:16:28 -04:00
finish
2013-09-26 06:44:31 -04:00
endif
let current_compiler = "rustc"
2018-10-08 13:00:59 -04:00
" vint: -ProhibitAbbreviationOption
let s:save_cpo = &cpo
2013-09-26 06:44:31 -04:00
set cpo&vim
2018-10-08 13:00:59 -04:00
" vint: +ProhibitAbbreviationOption
2013-09-26 06:44:31 -04:00
if exists(":CompilerSet") != 2
2018-07-08 09:16:28 -04:00
command -nargs=* CompilerSet setlocal <args>
2013-09-26 06:44:31 -04:00
endif
2018-07-08 09:16:28 -04:00
if get(g:, 'rustc_makeprg_no_percent', 0)
CompilerSet makeprg=rustc
2013-09-26 06:44:31 -04:00
else
2018-07-08 09:16:28 -04:00
CompilerSet makeprg=rustc\ \%
2013-09-26 06:44:31 -04:00
endif
2018-07-08 09:16:28 -04:00
" New errorformat (after nightly 2016/08/10)
2013-09-26 06:44:31 -04:00
CompilerSet errorformat=
2018-07-08 09:16:28 -04: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
2013-09-26 06:44:31 -04:00
2018-07-08 09:16:28 -04:00
" Old errorformat (before nightly 2016/08/10)
2016-12-20 14:57:20 -05:00
CompilerSet errorformat+=
2018-07-08 09:16:28 -04:00
\%f:%l:%c:\ %t%*[^:]:\ %m,
\%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m,
\%-G%f:%l\ %s,
\%-G%*[\ ]^,
\%-G%*[\ ]^%*[~],
\%-G%*[\ ]...
2016-12-20 14:57:20 -05:00
2018-10-08 13:00:59 -04:00
" vint: -ProhibitAbbreviationOption
let &cpo = s:save_cpo
unlet s:save_cpo
" vint: +ProhibitAbbreviationOption
2018-07-08 09:16:28 -04:00
" vim: set et sw=4 sts=4 ts=8: