diff options
Diffstat (limited to 'compiler/rustc.vim')
-rw-r--r-- | compiler/rustc.vim | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/compiler/rustc.vim b/compiler/rustc.vim index 7b691b31..23390fd9 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -7,7 +7,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists("current_compiler") - finish + finish endif let current_compiler = "rustc" @@ -15,36 +15,39 @@ let s:cpo_save = &cpo set cpo&vim if exists(":CompilerSet") != 2 - command -nargs=* CompilerSet setlocal <args> + command -nargs=* CompilerSet setlocal <args> endif -if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent != 0 - CompilerSet makeprg=rustc +if get(g:, 'rustc_makeprg_no_percent', 0) + CompilerSet makeprg=rustc else - CompilerSet makeprg=rustc\ \% + CompilerSet makeprg=rustc\ \% endif -" Old errorformat (before nightly 2016/08/10) +" New errorformat (after nightly 2016/08/10) CompilerSet errorformat= - \%f:%l:%c:\ %t%*[^:]:\ %m, - \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, - \%-G%f:%l\ %s, - \%-G%*[\ ]^, - \%-G%*[\ ]^%*[~], - \%-G%*[\ ]... + \%-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 -" New errorformat (after nightly 2016/08/10) +" Old errorformat (before nightly 2016/08/10) CompilerSet errorformat+= - \%-G, - \%-Gerror:\ aborting\ %.%#, - \%-Gerror:\ Could\ not\ compile\ %.%#, - \%Eerror:\ %m, - \%Eerror[E%n]:\ %m, - \%Wwarning:\ %m, - \%Inote:\ %m, - \%C\ %#-->\ %f:%l:%c + \%f:%l:%c:\ %t%*[^:]:\ %m, + \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, + \%-G%f:%l\ %s, + \%-G%*[\ ]^, + \%-G%*[\ ]^%*[~], + \%-G%*[\ ]... let &cpo = s:cpo_save unlet s:cpo_save +" vim: set et sw=4 sts=4 ts=8: + endif |