aboutsummaryrefslogtreecommitdiff
path: root/runtime/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/compiler')
-rw-r--r--runtime/compiler/bdf.vim6
-rw-r--r--runtime/compiler/cargo.vim35
-rw-r--r--runtime/compiler/gcc.vim6
-rw-r--r--runtime/compiler/rst.vim25
-rw-r--r--runtime/compiler/rustc.vim46
5 files changed, 103 insertions, 15 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/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/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/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