summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/puppet-lint.vim27
-rw-r--r--compiler/sml.vim32
-rw-r--r--compiler/tidy.vim17
-rw-r--r--compiler/zig.vim32
-rw-r--r--compiler/zig_build.vim32
-rw-r--r--compiler/zig_build_exe.vim30
-rw-r--r--compiler/zig_test.vim30
7 files changed, 195 insertions, 5 deletions
diff --git a/compiler/puppet-lint.vim b/compiler/puppet-lint.vim
new file mode 100644
index 00000000..c65eeb19
--- /dev/null
+++ b/compiler/puppet-lint.vim
@@ -0,0 +1,27 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'puppet', 'compiler/puppet-lint.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: puppet-lint
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "puppet-lint"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet makeprg=puppet-lint\ --with-filename
+CompilerSet errorformat=%f\ -\ %tRROR:\ %m\ on\ line\ %l,
+ \%f\ -\ %tARNING:\ %m\ on\ line\ %l,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/compiler/sml.vim b/compiler/sml.vim
new file mode 100644
index 00000000..e9b65a8e
--- /dev/null
+++ b/compiler/sml.vim
@@ -0,0 +1,32 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'sml', 'compiler/sml.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: SML/NJ Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2020 Feb 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "sml"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+CompilerSet makeprg=sml
+CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m,
+ \%f:%l.%c\ %trror:\ %m,
+ \%trror:\ %m
+ \%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m,
+ \%f:%l.%c\ %tarning:\ %m,
+ \%tarning:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/compiler/tidy.vim b/compiler/tidy.vim
index fec701da..6e362455 100644
--- a/compiler/tidy.vim
+++ b/compiler/tidy.vim
@@ -5,7 +5,7 @@ endif
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2016 Apr 21
+" Last Change: 2020 Sep 4
if exists("current_compiler")
finish
@@ -16,8 +16,15 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
-CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S
+let s:cpo_save = &cpo
+set cpo&vim
-" foo.html:8:1: Warning: inserting missing 'foobar' element
-" foo.html:9:2: Error: <foobar> is not recognized!
-CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%#
+CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes
+CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m,
+ \%f:%l:%c:\ %tarning:\ %m,
+ \%f:%l:%c:\ %tnfo:\ %m,
+ \%f:%l:%c:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/compiler/zig.vim b/compiler/zig.vim
new file mode 100644
index 00000000..caa19563
--- /dev/null
+++ b/compiler/zig.vim
@@ -0,0 +1,32 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'zig', 'compiler/zig.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: Zig Compiler
+" For bugs, patches and license go to https://github.com/ziglang/zig.vim
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "zig"
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+" a subcommand must be provided for the this compiler (test, build-exe, etc)
+if has('patch-7.4.191')
+ CompilerSet makeprg=zig\ \$*\ \%:S
+else
+ CompilerSet makeprg=zig\ \$*\ \"%\"
+endif
+
+" TODO: improve errorformat as needed.
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
diff --git a/compiler/zig_build.vim b/compiler/zig_build.vim
new file mode 100644
index 00000000..65472809
--- /dev/null
+++ b/compiler/zig_build.vim
@@ -0,0 +1,32 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'zig', 'compiler/zig_build.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: Zig Compiler (zig build)
+
+if exists('current_compiler')
+ finish
+endif
+runtime compiler/zig.vim
+let current_compiler = 'zig_build'
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+
+if exists(':CompilerSet') != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if exists('g:zig_build_makeprg_params')
+ execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
+else
+ CompilerSet makeprg=zig\ build\ $*
+endif
+
+" TODO: anything to add to errorformat for zig build specifically?
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
diff --git a/compiler/zig_build_exe.vim b/compiler/zig_build_exe.vim
new file mode 100644
index 00000000..fb46d208
--- /dev/null
+++ b/compiler/zig_build_exe.vim
@@ -0,0 +1,30 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'zig', 'compiler/zig_build_exe.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: Zig Compiler (zig build-exe)
+
+if exists('current_compiler')
+ finish
+endif
+runtime compiler/zig.vim
+let current_compiler = 'zig_build_exe'
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+
+if exists(':CompilerSet') != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if has('patch-7.4.191')
+ CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
+else
+ CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$*
+endif
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
diff --git a/compiler/zig_test.vim b/compiler/zig_test.vim
new file mode 100644
index 00000000..2000e946
--- /dev/null
+++ b/compiler/zig_test.vim
@@ -0,0 +1,30 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'zig', 'compiler/zig_test.vim')
+ finish
+endif
+
+" Vim compiler file
+" Compiler: Zig Compiler (zig test)
+
+if exists('current_compiler')
+ finish
+endif
+runtime compiler/zig.vim
+let current_compiler = 'zig_test'
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+
+if exists(':CompilerSet') != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if has('patch-7.4.191')
+ CompilerSet makeprg=zig\ test\ \%:S\ \$*
+else
+ CompilerSet makeprg=zig\ test\ \"%\"\ \$*
+endif
+
+let &cpo = s:save_cpo
+unlet s:save_cpo
+" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab