aboutsummaryrefslogtreecommitdiff
path: root/runtime/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/compiler')
-rw-r--r--runtime/compiler/checkstyle.vim20
-rw-r--r--runtime/compiler/cm3.vim26
-rw-r--r--runtime/compiler/dart.vim26
-rw-r--r--runtime/compiler/dart2js.vim28
-rw-r--r--runtime/compiler/dart2native.vim28
-rw-r--r--runtime/compiler/dartanalyser.vim23
-rw-r--r--runtime/compiler/dartdevc.vim28
-rw-r--r--runtime/compiler/dartdoc.vim26
-rw-r--r--runtime/compiler/dartfmt.vim25
-rw-r--r--runtime/compiler/eslint.vim16
-rw-r--r--runtime/compiler/fbc.vim27
-rw-r--r--runtime/compiler/gawk.vim34
-rw-r--r--runtime/compiler/gjs.vim25
-rw-r--r--runtime/compiler/javac.vim15
-rw-r--r--runtime/compiler/jest.vim30
-rw-r--r--runtime/compiler/jjs.vim24
-rw-r--r--runtime/compiler/jshint.vim25
-rw-r--r--runtime/compiler/jsonlint.vim25
-rw-r--r--runtime/compiler/ocaml.vim6
-rw-r--r--runtime/compiler/powershell.vim84
-rw-r--r--runtime/compiler/rhino.vim30
-rw-r--r--runtime/compiler/rubocop.vim23
-rw-r--r--runtime/compiler/shellcheck.vim25
-rw-r--r--runtime/compiler/sml.vim28
-rw-r--r--runtime/compiler/standard.vim16
-rw-r--r--runtime/compiler/stylelint.vim26
-rw-r--r--runtime/compiler/tidy.vim17
-rw-r--r--runtime/compiler/typedoc.vim28
28 files changed, 719 insertions, 15 deletions
diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim
index ccab3c585d..4ebd9e15b5 100644
--- a/runtime/compiler/checkstyle.vim
+++ b/runtime/compiler/checkstyle.vim
@@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: Checkstyle
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2013 Jun 26
+" Last Change: 2020 Aug 2
if exists("current_compiler")
finish
@@ -12,8 +12,18 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
-CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain
+let s:cpo_save = &cpo
+set cpo&vim
-" sample error: WebTable.java:282: '+=' is not preceded with whitespace.
-" WebTable.java:201:1: '{' should be on the previous line.
-CompilerSet errorformat=%f:%l:%v:\ %m,%f:%l:\ %m,%-G%.%#
+" CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain\ -c\ /sun_checks.xml
+" CompilerSet makeprg=java\ -jar\ checkstyle-X.XX-all.jar\ -f\ plain\ -c\ /sun_checks.xml
+
+CompilerSet makeprg=checkstyle\ -f\ plain
+CompilerSet errorformat=[%tRROR]\ %f:%l:%v:\ %m,
+ \[%tARN]\ %f:%l:%v:\ %m,
+ \[%tRROR]\ %f:%l:\ %m,
+ \[%tARN]\ %f:%l:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/cm3.vim b/runtime/compiler/cm3.vim
new file mode 100644
index 0000000000..3de51282e6
--- /dev/null
+++ b/runtime/compiler/cm3.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler: Critical Mass Modula-3 Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2021 Apr 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "cm3"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" TODO: better handling of Quake errors
+CompilerSet makeprg=cm3
+CompilerSet errorformat=%D---\ building\ in\ %f\ ---,
+ \%W\"%f\"\\,\ line\ %l:\ warning:\ %m,
+ \%E\"%f\"\\,\ line\ %l:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dart.vim b/runtime/compiler/dart.vim
new file mode 100644
index 0000000000..f9ebfe1b27
--- /dev/null
+++ b/runtime/compiler/dart.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler: Dart VM
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dart"
+
+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=dart
+CompilerSet errorformat=%E%f:%l:%c:\ Error:\ %m,
+ \%CTry\ %.%#,
+ \%Z\ %#^%\\+,
+ \%C%.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dart2js.vim b/runtime/compiler/dart2js.vim
new file mode 100644
index 0000000000..b6a4e4d530
--- /dev/null
+++ b/runtime/compiler/dart2js.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: Dart to JavaScript Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dart2js"
+
+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=dart2js
+CompilerSet errorformat=%E%f:%l:%c:,
+ \%-GError:\ Compilation\ failed.,
+ \%CError:\ %m,
+ \%Z\ %#^%\\+,
+ \%C%.%#,
+ \%trror:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dart2native.vim b/runtime/compiler/dart2native.vim
new file mode 100644
index 0000000000..51bdab0cc3
--- /dev/null
+++ b/runtime/compiler/dart2native.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: Dart to Native Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dart2native"
+
+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=dart2native
+CompilerSet errorformat=%E%f:%l:%c:\ Error:\ %m,
+ \%CTry\ %.%#,
+ \%Z\ %#^%\\+,
+ \%Z%$,
+ \%C%.%#,
+ \%E%f:\ %trror:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dartanalyser.vim b/runtime/compiler/dartanalyser.vim
new file mode 100644
index 0000000000..e691d80b61
--- /dev/null
+++ b/runtime/compiler/dartanalyser.vim
@@ -0,0 +1,23 @@
+" Vim compiler file
+" Compiler: Dart Analyzer
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dartanalyzer"
+
+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=dartanalyzer\ --format\ machine
+CompilerSet errorformat=%t%\\w%\\+\|%\\w%\\+\|%\\w%\\+\|%f\|%l\|%c\|%\\d%\\+\|%m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dartdevc.vim b/runtime/compiler/dartdevc.vim
new file mode 100644
index 0000000000..e8d1988ed6
--- /dev/null
+++ b/runtime/compiler/dartdevc.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: Dart Development Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dartdevc"
+
+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=dartdevc
+CompilerSet errorformat=%E%f:%l:%c:\ Error:\ %m,
+ \%CTry\ %.%#,
+ \%Z\ %#^%\\+,
+ \%Z%$,
+ \%C%.%#,
+ \%E%f:\ %trror:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dartdoc.vim b/runtime/compiler/dartdoc.vim
new file mode 100644
index 0000000000..26b38d8dd4
--- /dev/null
+++ b/runtime/compiler/dartdoc.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler: Dart Documentation Generator
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dartdoc"
+
+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=dartdoc
+CompilerSet errorformat=\ \ %tarning:\ %m,
+ \\ \ %trror:\ %m,
+ \%+EGeneration\ failed:\ %m,
+ \%+ISuccess!\ Docs\ generated\ into\ %f,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/dartfmt.vim b/runtime/compiler/dartfmt.vim
new file mode 100644
index 0000000000..2e4ab02ad3
--- /dev/null
+++ b/runtime/compiler/dartfmt.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: Dart Formatter
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 May 08
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "dartfmt"
+
+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=dartfmt
+CompilerSet errorformat=%Eline\ %l\\,\ column\ %c\ of\ %f:\ %m,
+ \%Z\ %\\{3}│\ %\\+^%\\+,
+ \%C%.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/eslint.vim b/runtime/compiler/eslint.vim
new file mode 100644
index 0000000000..7d57acbdf4
--- /dev/null
+++ b/runtime/compiler/eslint.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: ESLint for JavaScript
+" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
+" Last Change: 2020 August 20
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "eslint"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=npx\ eslint\ --format\ compact
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%#
diff --git a/runtime/compiler/fbc.vim b/runtime/compiler/fbc.vim
new file mode 100644
index 0000000000..1c29392da8
--- /dev/null
+++ b/runtime/compiler/fbc.vim
@@ -0,0 +1,27 @@
+" Vim compiler file
+" Compiler: FreeBASIC Compiler
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2015 Jan 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "fbc"
+
+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=fbc
+CompilerSet errorformat=%-G%.%#Too\ many\ errors\\,\ exiting,
+ \%f(%l)\ %tarning\ %n(%\\d%\\+):\ %m,
+ \%E%f(%l)\ error\ %n:\ %m,
+ \%-Z%p^,
+ \%-C%.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/gawk.vim b/runtime/compiler/gawk.vim
new file mode 100644
index 0000000000..a109eb8642
--- /dev/null
+++ b/runtime/compiler/gawk.vim
@@ -0,0 +1,34 @@
+" Vim compiler file
+" Compiler: GNU Awk
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2020 Feb 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "gawk"
+
+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=gawk
+CompilerSet errorformat=%Z%.awk:\ %f:%l:\ %p^\ %m,
+ \%Eg%\\=awk:\ %f:%l:\ fatal:\ %m,
+ \%Egawk:\ %f:%l:\ error:\ %m,
+ \%Wgawk:\ %f:%l:\ warning:\ %m,
+ \%Egawk:\ %f:%l:\ %.%#,
+ \gawk:\ %f:%l:\ %tatal:\ %m,
+ \gawk:\ %f:%l:\ %trror:\ %m,
+ \gawk:\ %f:%l:\ %tarning:\ %m,
+ \gawk:\ %tatal:\ %m,
+ \gawk:\ %trror:\ %m,
+ \gawk:\ %tarning:\ %m,
+ \%+C%.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/gjs.vim b/runtime/compiler/gjs.vim
new file mode 100644
index 0000000000..e033764030
--- /dev/null
+++ b/runtime/compiler/gjs.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: GJS (Gnome JavaScript Bindings)
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 Jul 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "gjs"
+
+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=gjs
+CompilerSet errorformat=%.%#JS\ %tRROR:\ %m\ @\ %f:%c,
+ \%E%.%#JS\ ERROR:\ %m,
+ \%Z@%f:%l:%c,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/javac.vim b/runtime/compiler/javac.vim
index a50bdca8f2..8507efd67c 100644
--- a/runtime/compiler/javac.vim
+++ b/runtime/compiler/javac.vim
@@ -1,7 +1,7 @@
" Vim compiler file
-" Compiler: javac
+" Compiler: Java Development Kit Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2004 Nov 27
+" Last Change: 2019 Oct 21
if exists("current_compiler")
finish
@@ -12,6 +12,15 @@ 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=javac
+CompilerSet errorformat=%E%f:%l:\ error:\ %m,
+ \%W%f:%l:\ warning:\ %m,
+ \%-Z%p^,
+ \%-C%.%#,
+ \%-G%.%#
-CompilerSet errorformat=%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%#
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/jest.vim b/runtime/compiler/jest.vim
new file mode 100644
index 0000000000..fee70b7c55
--- /dev/null
+++ b/runtime/compiler/jest.vim
@@ -0,0 +1,30 @@
+" Vim compiler file
+" Compiler: Jest
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2018 May 15
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "jest"
+
+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=npx\ jest\ --no-colors
+
+CompilerSet makeprg=jest\ --no-colors
+CompilerSet errorformat=%E\ \ ●\ %m,
+ \%Z\ %\\{4}%.%#Error:\ %f:\ %m\ (%l:%c):%\\=,
+ \%Z\ %\\{6}at\ %\\S%#\ (%f:%l:%c),
+ \%+C\ %\\{4}%\\w%.%#,
+ \%+C\ %\\{4}%[-+]%.%#,
+ \%-C%.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/jjs.vim b/runtime/compiler/jjs.vim
new file mode 100644
index 0000000000..09a973683a
--- /dev/null
+++ b/runtime/compiler/jjs.vim
@@ -0,0 +1,24 @@
+" Vim compiler file
+" Compiler: Nashorn Shell
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2018 Jan 9
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "jjs"
+
+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=jjs
+CompilerSet errorformat=%f:%l:%c\ %m,
+ \%f:%l\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/jshint.vim b/runtime/compiler/jshint.vim
new file mode 100644
index 0000000000..865591cd2b
--- /dev/null
+++ b/runtime/compiler/jshint.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: JSHint
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 Jul 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "jshint"
+
+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=npx\ jshint\ --verbose
+
+CompilerSet makeprg=jshint\ --verbose
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m\ (%t%n),
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/jsonlint.vim b/runtime/compiler/jsonlint.vim
new file mode 100644
index 0000000000..5466dcc7f4
--- /dev/null
+++ b/runtime/compiler/jsonlint.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: JSON Lint
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 Jul 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "jsonlint"
+
+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=npx\ jsonlint\ --compact\ --quiet
+
+CompilerSet makeprg=jsonlint\ --compact\ --quiet
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ found:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/ocaml.vim b/runtime/compiler/ocaml.vim
index 7f8a7eab67..faa8af1f5f 100644
--- a/runtime/compiler/ocaml.vim
+++ b/runtime/compiler/ocaml.vim
@@ -1,11 +1,11 @@
" Vim Compiler File
" Compiler: ocaml
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
-" URL: https://github.com/rgrinberg/vim-ocaml
+" URL: https://github.com/ocaml/vim-ocaml
" Last Change:
+" 2020 Mar 28 - Improved error format (Thomas Leonard)
" 2017 Nov 26 - Improved error format (Markus Mottl)
" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
-" 2013 Jun 30 - Initial version (Marc Weber)
"
" Marc Weber's comments:
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
@@ -21,6 +21,7 @@
"
" So having it here makes people opt-in
+
if exists("current_compiler")
finish
endif
@@ -30,6 +31,7 @@ let s:cpo_save = &cpo
set cpo&vim
CompilerSet errorformat =
+ \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
diff --git a/runtime/compiler/powershell.vim b/runtime/compiler/powershell.vim
new file mode 100644
index 0000000000..45d5ec2191
--- /dev/null
+++ b/runtime/compiler/powershell.vim
@@ -0,0 +1,84 @@
+" Vim compiler file
+" Compiler: powershell
+" URL: https://github.com/PProvost/vim-ps1
+" Last Change: 2020 Mar 30
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "powershell"
+
+if exists(":CompilerSet") != 2 " older Vim always used :setlocal
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+if !exists("g:ps1_makeprg_cmd")
+ if executable('pwsh')
+ " pwsh is the future
+ let g:ps1_makeprg_cmd = 'pwsh'
+ elseif executable('pwsh.exe')
+ let g:ps1_makeprg_cmd = 'pwsh.exe'
+ elseif executable('powershell.exe')
+ let g:ps1_makeprg_cmd = 'powershell.exe'
+ else
+ let g:ps1_makeprg_cmd = ''
+ endif
+endif
+
+if !executable(g:ps1_makeprg_cmd)
+ echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!"
+endif
+
+" Show CategoryInfo, FullyQualifiedErrorId, etc?
+let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
+
+" Use absolute path because powershell requires explicit relative paths
+" (./file.ps1 is okay, but # expands to file.ps1)
+let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
+
+" Parse file, line, char from callstacks:
+" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
+" cmdlet, function, script file, or operable program. Check the spelling
+" of the name, or if a path was included, verify that the path is correct
+" and try again.
+" At C:\script.ps1:11 char:5
+" + Write-Ouput $content
+" + ~~~~~~~~~~~
+" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
+" + FullyQualifiedErrorId : CommandNotFoundException
+
+" Showing error in context with underlining.
+CompilerSet errorformat=%+G+%m
+" Error summary.
+CompilerSet errorformat+=%E%*\\S\ :\ %m
+" Error location.
+CompilerSet errorformat+=%CAt\ %f:%l\ char:%c
+" Errors that span multiple lines (may be wrapped to width of terminal).
+CompilerSet errorformat+=%C%m
+" Ignore blank/whitespace-only lines.
+CompilerSet errorformat+=%Z\\s%#
+
+if g:ps1_efm_show_error_categories
+ CompilerSet errorformat^=%+G\ \ \ \ +\ %.%#\\s%#:\ %m
+else
+ CompilerSet errorformat^=%-G\ \ \ \ +\ %.%#\\s%#:\ %m
+endif
+
+
+" Parse file, line, char from of parse errors:
+" At C:\script.ps1:22 char:16
+" + Stop-Process -Name "invalidprocess
+" + ~~~~~~~~~~~~~~~
+" The string is missing the terminator: ".
+" + CategoryInfo : ParserError: (:) [], ParseException
+" + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
+CompilerSet errorformat+=At\ %f:%l\ char:%c
+
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim:set sw=2 sts=2:
diff --git a/runtime/compiler/rhino.vim b/runtime/compiler/rhino.vim
new file mode 100644
index 0000000000..30f3dd3252
--- /dev/null
+++ b/runtime/compiler/rhino.vim
@@ -0,0 +1,30 @@
+" Vim compiler file
+" Compiler: Rhino Shell (JavaScript in Java)
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 Jul 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "rhino"
+
+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=java\ -jar\ lib/rhino-X.X.XX.jar\ -w\ -strict
+
+CompilerSet makeprg=rhino
+CompilerSet errorformat=%-Gjs:\ %.%#Compilation\ produced%.%#,
+ \%Ejs:\ \"%f\"\\,\ line\ %l:\ %m,
+ \%Ejs:\ uncaught\ JavaScript\ runtime\ exception:\ %m,
+ \%Wjs:\ warning:\ \"%f\"\\,\ line\ %l:\ %m,
+ \%Zjs:\ %p^,
+ \%Cjs:\ %.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/rubocop.vim b/runtime/compiler/rubocop.vim
new file mode 100644
index 0000000000..7764b4ad20
--- /dev/null
+++ b/runtime/compiler/rubocop.vim
@@ -0,0 +1,23 @@
+" Vim compiler file
+" Compiler: RuboCop
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2019 Jul 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "rubocop"
+
+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=rubocop\ --format\ emacs
+CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/shellcheck.vim b/runtime/compiler/shellcheck.vim
new file mode 100644
index 0000000000..7550439aa2
--- /dev/null
+++ b/runtime/compiler/shellcheck.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: ShellCheck
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2020 Sep 4
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "shellcheck"
+
+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=shellcheck\ -f\ gcc
+CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m\ [SC%n],
+ \%f:%l:%c:\ %tarning:\ %m\ [SC%n],
+ \%f:%l:%c:\ %tote:\ %m\ [SC%n],
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/sml.vim b/runtime/compiler/sml.vim
new file mode 100644
index 0000000000..c7e1b1bf16
--- /dev/null
+++ b/runtime/compiler/sml.vim
@@ -0,0 +1,28 @@
+" 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/runtime/compiler/standard.vim b/runtime/compiler/standard.vim
new file mode 100644
index 0000000000..50b7c97ca7
--- /dev/null
+++ b/runtime/compiler/standard.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: Standard for JavaScript
+" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
+" Last Change: 2020 August 20
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "standard"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=npx\ standard
+CompilerSet errorformat=%f:%l:%c:\ %m,%-G%.%#
diff --git a/runtime/compiler/stylelint.vim b/runtime/compiler/stylelint.vim
new file mode 100644
index 0000000000..784a61d46a
--- /dev/null
+++ b/runtime/compiler/stylelint.vim
@@ -0,0 +1,26 @@
+" Vim compiler file
+" Compiler: Stylelint
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2020 Jun 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "stylelint"
+
+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=npx\ stylelint\ --formatter\ compact
+
+CompilerSet makeprg=stylelint\ --formatter\ compact
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,
+ \%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/compiler/tidy.vim b/runtime/compiler/tidy.vim
index 75be8b83d9..3f8e68ebf2 100644
--- a/runtime/compiler/tidy.vim
+++ b/runtime/compiler/tidy.vim
@@ -1,7 +1,7 @@
" 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
@@ -12,8 +12,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/runtime/compiler/typedoc.vim b/runtime/compiler/typedoc.vim
new file mode 100644
index 0000000000..3be06f3d4e
--- /dev/null
+++ b/runtime/compiler/typedoc.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: TypeDoc
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2020 Feb 10
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "typedoc"
+
+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=npx\ typedoc
+
+CompilerSet makeprg=typedoc
+CompilerSet errorformat=%EError:\ %f(%l),
+ \%WWarning:\ %f(%l),
+ \%+IDocumentation\ generated\ at\ %f,
+ \%Z\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save