diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-07-08 15:16:28 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-07-08 15:16:28 +0200 |
commit | 055f7710b65dfa2df52fc0b5be2486ae36ac5751 (patch) | |
tree | 0b6c36a330e8c0c4e37ad521773d28b6c52ad3ec /compiler | |
parent | 33f610feb73ce782cf41a7d9a377541991c692b5 (diff) | |
download | vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.tar.gz vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.zip |
Update dependencies
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/cargo.vim | 30 | ||||
-rw-r--r-- | compiler/rustc.vim | 45 |
2 files changed, 43 insertions, 32 deletions
diff --git a/compiler/cargo.vim b/compiler/cargo.vim index 8e3c6212..10147e00 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.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 runtime compiler/rustc.vim let current_compiler = "cargo" @@ -16,26 +16,34 @@ let s:save_cpo = &cpo set cpo&vim if exists(':CompilerSet') != 2 - command -nargs=* CompilerSet setlocal <args> + command -nargs=* CompilerSet setlocal <args> endif if exists('g:cargo_makeprg_params') - execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' + execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' else - CompilerSet makeprg=cargo\ $* + CompilerSet makeprg=cargo\ $* endif +augroup RustCargoQuickFixHooks + autocmd! + autocmd QuickFixCmdPre make call cargo#quickfix#CmdPre() + autocmd QuickFixCmdPost make call cargo#quickfix#CmdPost() +augroup END + " Ignore general cargo progress messages CompilerSet errorformat+= - \%-G%\\s%#Downloading%.%#, - \%-G%\\s%#Compiling%.%#, - \%-G%\\s%#Finished%.%#, - \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, - \%-G%\\s%#To\ learn\ more\\,%.%#, - \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#, - \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l + \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Compiling%.%#, + \%-G%\\s%#Finished%.%#, + \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, + \%-G%\\s%#To\ learn\ more\\,%.%#, + \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#, + \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c let &cpo = s:save_cpo unlet s:save_cpo +" vim: set et sw=4 sts=4 ts=8: + endif 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 |