This commit is contained in:
Adam Stankiewicz
2021-03-01 13:44:50 +01:00
parent 4c10562d2c
commit cc63193ce8
62 changed files with 1166 additions and 1072 deletions

27
compiler/puppet-lint.vim Normal file
View File

@@ -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

32
compiler/sml.vim Normal file
View File

@@ -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

View File

@@ -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

32
compiler/zig.vim Normal file
View File

@@ -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

32
compiler/zig_build.vim Normal file
View File

@@ -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

View File

@@ -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

30
compiler/zig_test.vim Normal file
View File

@@ -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