diff options
Diffstat (limited to 'runtime/compiler')
-rw-r--r-- | runtime/compiler/bdf.vim | 6 | ||||
-rw-r--r-- | runtime/compiler/cargo.vim | 35 | ||||
-rw-r--r-- | runtime/compiler/context.vim | 54 | ||||
-rw-r--r-- | runtime/compiler/csslint.vim | 16 | ||||
-rw-r--r-- | runtime/compiler/cucumber.vim | 4 | ||||
-rw-r--r-- | runtime/compiler/gcc.vim | 6 | ||||
-rw-r--r-- | runtime/compiler/ghc.vim | 26 | ||||
-rw-r--r-- | runtime/compiler/haml.vim | 4 | ||||
-rw-r--r-- | runtime/compiler/pylint.vim | 16 | ||||
-rw-r--r-- | runtime/compiler/rake.vim | 6 | ||||
-rw-r--r-- | runtime/compiler/rspec.vim | 3 | ||||
-rw-r--r-- | runtime/compiler/rst.vim | 25 | ||||
-rw-r--r-- | runtime/compiler/rubyunit.vim | 2 | ||||
-rw-r--r-- | runtime/compiler/rustc.vim | 46 | ||||
-rw-r--r-- | runtime/compiler/sass.vim | 4 |
15 files changed, 230 insertions, 23 deletions
diff --git a/runtime/compiler/bdf.vim b/runtime/compiler/bdf.vim index ca33776988..b062e847aa 100644 --- a/runtime/compiler/bdf.vim +++ b/runtime/compiler/bdf.vim @@ -1,7 +1,7 @@ " Vim compiler file -" Compiler: BDF to PCF Conversion -" Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Compiler: BDF to PCF Conversion +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 if exists("current_compiler") finish diff --git a/runtime/compiler/cargo.vim b/runtime/compiler/cargo.vim new file mode 100644 index 0000000000..bd48666bc9 --- /dev/null +++ b/runtime/compiler/cargo.vim @@ -0,0 +1,35 @@ +" Vim compiler file +" Compiler: Cargo Compiler +" Maintainer: Damien Radtke <damienradtke@gmail.com> +" Latest Revision: 2014 Sep 24 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists('current_compiler') + finish +endif +runtime compiler/rustc.vim +let current_compiler = "cargo" + +let s:save_cpo = &cpo +set cpo&vim + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +if exists('g:cargo_makeprg_params') + execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' +else + CompilerSet makeprg=cargo\ $* +endif + +" 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\\,%.%# + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/compiler/context.vim b/runtime/compiler/context.vim new file mode 100644 index 0000000000..cb78c96df0 --- /dev/null +++ b/runtime/compiler/context.vim @@ -0,0 +1,54 @@ +" Vim compiler file +" Compiler: ConTeXt typesetting engine +" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> +" Last Change: 2016 Oct 21 + +if exists("current_compiler") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +" If makefile exists and we are not asked to ignore it, we use standard make +" (do not redefine makeprg) +if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) || + \ (!filereadable('Makefile') && !filereadable('makefile')) + let current_compiler = 'context' + " The following assumes that the current working directory is set to the + " directory of the file to be typeset + let &l:makeprg = get(b:, 'context_mtxrun', get(g:, 'context_mtxrun', 'mtxrun')) + \ . ' --script context --autogenerate --nonstopmode --synctex=' + \ . (get(b:, 'context_synctex', get(g:, 'context_synctex', 0)) ? '1' : '0') + \ . ' ' . get(b:, 'context_extra_options', get(g:, 'context_extra_options', '')) + \ . ' ' . shellescape(expand('%:p:t')) +else + let current_compiler = 'make' +endif + +let b:context_errorformat = '' + \ . '%-Popen source%.%#> %f,' + \ . '%-Qclose source%.%#> %f,' + \ . "%-Popen source%.%#name '%f'," + \ . "%-Qclose source%.%#name '%f'," + \ . '%Etex %trror%.%#mp error on line %l in file %f:%.%#,' + \ . 'tex %trror%.%#error on line %l in file %f: %m,' + \ . '%Elua %trror%.%#error on line %l in file %f:,' + \ . '%+Emetapost %#> error: %#,' + \ . '! error: %#%m,' + \ . '%-C %#,' + \ . '%C! %m,' + \ . '%Z[ctxlua]%m,' + \ . '%+C<*> %.%#,' + \ . '%-C%.%#,' + \ . '%Z...%m,' + \ . '%-Zno-error,' + \ . '%-G%.%#' " Skip remaining lines + +execute 'CompilerSet errorformat=' . escape(b:context_errorformat, ' ') + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim new file mode 100644 index 0000000000..14c4289a24 --- /dev/null +++ b/runtime/compiler/csslint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: csslint for CSS +" Maintainer: Daniel Moch <daniel@danielmoch.com> +" Last Change: 2016 May 21 + +if exists("current_compiler") + finish +endif +let current_compiler = "csslint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=csslint\ --format=compact +CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim index c020be6e3b..17ce3627c1 100644 --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Cucumber " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber CompilerSet errorformat= \%W%m\ (Cucumber::Undefined), - \%E%m\ (%.%#), + \%E%m\ (%\\S%#), \%Z%f:%l, \%Z%f:%l:%.%# diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim index 19ea2edc12..1af568de57 100644 --- a/runtime/compiler/gcc.vim +++ b/runtime/compiler/gcc.vim @@ -1,7 +1,7 @@ " Vim compiler file -" Compiler: GNU C Compiler -" Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2010-10-14 +" Compiler: GNU C Compiler +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2010-10-14 " added line suggested by Anton Lindqvist 2016 Mar 31 if exists("current_compiler") diff --git a/runtime/compiler/ghc.vim b/runtime/compiler/ghc.vim new file mode 100644 index 0000000000..c98ae302a8 --- /dev/null +++ b/runtime/compiler/ghc.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: GHC Haskell Compiler +" Maintainer: Daniel Campoverde <alx@sillybytes.net> +" Latest Revision: 2016-11-29 + +if exists("current_compiler") + finish +endif +let current_compiler = "ghc" + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet errorformat= + \%-G%.%#:\ build, + \%-G%.%#preprocessing\ library\ %.%#, + \%-G[%.%#]%.%#, + \%E%f:%l:%c:\ %m, + \%-G--%.%# + +if exists('g:compiler_ghc_ignore_unmatched_lines') + CompilerSet errorformat+=%-G%.%# +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim index b06a672df7..9464c3dc85 100644 --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=haml\ -c +CompilerSet makeprg=haml CompilerSet errorformat= \Haml\ %trror\ on\ line\ %l:\ %m, diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim new file mode 100644 index 0000000000..93079ce61d --- /dev/null +++ b/runtime/compiler/pylint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: Pylint for Python +" Maintainer: Daniel Moch <daniel@danielmoch.com> +" Last Change: 2016 May 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "pylint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no +CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim index 3bd9da0daf..8490f2a9e9 100644 --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -27,7 +27,11 @@ CompilerSet errorformat= \%\\s%#[%f:%l:\ %#%m, \%\\s%#%f:%l:\ %#%m, \%\\s%#%f:%l:, - \%m\ [%f:%l]: + \%m\ [%f:%l]:, + \%+Erake\ aborted!, + \%+EDon't\ know\ how\ to\ build\ task\ %.%#, + \%+Einvalid\ option:%.%#, + \%+Irake\ %\\S%\\+%\\s%\\+#\ %.%# let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim index 7c340bab15..c77bd70da7 100644 --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -22,9 +22,10 @@ CompilerSet errorformat= \%f:%l:\ %tarning:\ %m, \%E%.%#:in\ `load':\ %f:%l:%m, \%E%f:%l:in\ `%*[^']':\ %m, - \%-Z\ \ \ \ \ \#\ %f:%l:%.%#, + \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, \%E\ \ %\\d%\\+)%.%#, \%C\ \ \ \ \ %m, + \%C%\\s%#, \%-G%.%# let &cpo = s:cpo_save diff --git a/runtime/compiler/rst.vim b/runtime/compiler/rst.vim index 15d2d79f64..392bea6ae0 100644 --- a/runtime/compiler/rst.vim +++ b/runtime/compiler/rst.vim @@ -1,7 +1,8 @@ " Vim compiler file -" Compiler: reStructuredText Documentation Format -" Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org +" Description: reStructuredText Documentation Format +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2017-03-31 if exists("current_compiler") finish @@ -11,12 +12,18 @@ let current_compiler = "rst" let s:cpo_save = &cpo set cpo&vim -setlocal errorformat= - \%f:%l:\ (%tEBUG/0)\ %m, - \%f:%l:\ (%tNFO/1)\ %m, - \%f:%l:\ (%tARNING/2)\ %m, - \%f:%l:\ (%tRROR/3)\ %m, - \%f:%l:\ (%tEVERE/3)\ %m, +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat= + \%f\\:%l:\ %tEBUG:\ %m, + \%f\\:%l:\ %tNFO:\ %m, + \%f\\:%l:\ %tARNING:\ %m, + \%f\\:%l:\ %tRROR:\ %m, + \%f\\:%l:\ %tEVERE:\ %m, + \%f\\:%s:\ %tARNING:\ %m, + \%f\\:%s:\ %tRROR:\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim index 93a0c8e653..ed0639b581 100644 --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -17,6 +17,8 @@ let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=testrb +" CompilerSet makeprg=ruby\ -Itest +" CompilerSet makeprg=m CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, \%C%m\ [%f:%l]:, diff --git a/runtime/compiler/rustc.vim b/runtime/compiler/rustc.vim new file mode 100644 index 0000000000..c27bdc9c0c --- /dev/null +++ b/runtime/compiler/rustc.vim @@ -0,0 +1,46 @@ +" Vim compiler file +" Compiler: Rust Compiler +" Maintainer: Chris Morgan <me@chrismorgan.info> +" Latest Revision: 2013 Jul 12 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("current_compiler") + finish +endif +let current_compiler = "rustc" + +let s:cpo_save = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent != 0 + CompilerSet makeprg=rustc +else + CompilerSet makeprg=rustc\ \% +endif + +" Old errorformat (before 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%*[\ ]... + +" New errorformat (after 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 + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim index 376a52b303..9c540ac443 100644 --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=sass\ -c +CompilerSet makeprg=sass CompilerSet errorformat= \%f:%l:%m\ (Sass::Syntax%trror), |