diff options
Diffstat (limited to 'compiler')
38 files changed, 38 insertions, 304 deletions
diff --git a/compiler/ant.vim b/compiler/ant.vim index 32470076..8d1b66fb 100644 --- a/compiler/ant.vim +++ b/compiler/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim Compiler File " Compiler: ant @@ -45,5 +40,3 @@ CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/bdf.vim b/compiler/bdf.vim index 2bf1c12f..097d6b00 100644 --- a/compiler/bdf.vim +++ b/compiler/bdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/bdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bdf') == -1 " Vim compiler file " Compiler: BDF to PCF Conversion @@ -29,5 +24,3 @@ setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/cake.vim b/compiler/cake.vim index d3ac35d3..993bf1cf 100644 --- a/compiler/cake.vim +++ b/compiler/cake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -22,5 +17,3 @@ call coffee#CoffeeSetUpVariables() exec 'CompilerSet makeprg=' . escape(g:coffee_cake . ' ' . \ g:coffee_cake_options . ' $*', ' ') call coffee#CoffeeSetUpErrorFormat() - -endif diff --git a/compiler/cargo.vim b/compiler/cargo.vim index c8719dc9..92569939 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cargo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim compiler file " Compiler: Cargo Compiler @@ -56,5 +51,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/coffee.vim b/compiler/coffee.vim index a9e1a6bf..c5dcce7f 100644 --- a/compiler/coffee.vim +++ b/compiler/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -89,5 +84,3 @@ augroup CoffeeUpdateMakePrg autocmd BufWritePre,BufFilePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/credo.vim b/compiler/credo.vim index 801e79d9..e39c6b7c 100644 --- a/compiler/credo.vim +++ b/compiler/credo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/credo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('current_compiler') finish @@ -18,5 +13,3 @@ endif CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,%f:%l:\ %t:\ %m CompilerSet makeprg=mix\ credo\ suggest\ --format=flycheck - -endif diff --git a/compiler/cryptol.vim b/compiler/cryptol.vim index 8cc53f38..062109ac 100644 --- a/compiler/cryptol.vim +++ b/compiler/cryptol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cryptol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cryptol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 " Vim compiler file " Compiler: Cryptol version 1.8.19-academic Compiler @@ -27,5 +22,3 @@ CompilerSet errorformat& " use the default 'errorformat' " "%<" means the current file name without extension. CompilerSet makeprg=cryptol\ -o\ %<\ % - -endif diff --git a/compiler/cs.vim b/compiler/cs.vim index 04a6938b..195887cf 100644 --- a/compiler/cs.vim +++ b/compiler/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim compiler file " Compiler: Microsoft Visual Studio C# @@ -33,5 +28,3 @@ CompilerSet makeprg=csc\ %:S let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/compiler/cucumber.vim b/compiler/cucumber.vim index 4a4eba7e..a41c0de4 100644 --- a/compiler/cucumber.vim +++ b/compiler/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim compiler file " Compiler: Cucumber @@ -36,5 +31,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/dot.vim b/compiler/dot.vim index e1fc35ed..5002e5ff 100644 --- a/compiler/dot.vim +++ b/compiler/dot.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/dot.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dot', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dot') == -1 " Vim compiler file " Compiler: ATT dot @@ -22,5 +17,3 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal endif CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" - -endif diff --git a/compiler/eruby.vim b/compiler/eruby.vim index b50b655a..dd006baa 100644 --- a/compiler/eruby.vim +++ b/compiler/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: eRuby @@ -46,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/exunit.vim b/compiler/exunit.vim index 97ea0341..2a52eff8 100644 --- a/compiler/exunit.vim +++ b/compiler/exunit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/exunit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("current_compiler") finish @@ -32,5 +27,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/fish.vim b/compiler/fish.vim index 6dfb84f9..1ae935f8 100644 --- a/compiler/fish.vim +++ b/compiler/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 if exists('current_compiler') finish @@ -14,5 +9,3 @@ let current_compiler = 'fish' CompilerSet makeprg=fish\ --no-execute\ % execute 'CompilerSet errorformat='.escape(fish#errorformat(), ' ') - -endif diff --git a/compiler/go.vim b/compiler/go.vim index 1d7b873e..fba6a94f 100644 --- a/compiler/go.vim +++ b/compiler/go.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/go.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " Copyright 2013 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -55,5 +50,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/compiler/gradle.vim b/compiler/gradle.vim index 5fdb164a..7790daac 100644 --- a/compiler/gradle.vim +++ b/compiler/gradle.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/gradle.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gradle', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 " Vim Compiler File " Compiler: gradle @@ -31,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/gradlew.vim b/compiler/gradlew.vim index 3cfd0e80..68f23d76 100644 --- a/compiler/gradlew.vim +++ b/compiler/gradlew.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/gradlew.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gradle', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 " Vim Compiler File " Compiler: gradlew @@ -31,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/haml.vim b/compiler/haml.vim index 415a579c..08a64bc5 100644 --- a/compiler/haml.vim +++ b/compiler/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim compiler file " Compiler: Haml @@ -35,5 +30,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/ledger.vim b/compiler/ledger.vim index 70b89925..e0220582 100644 --- a/compiler/ledger.vim +++ b/compiler/ledger.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ledger.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ledger', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 " Vim Compiler File " Compiler: ledger @@ -39,5 +34,3 @@ if !g:ledger_is_hledger else exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' endif - -endif diff --git a/compiler/lilypond.vim b/compiler/lilypond.vim index 2ae68a3b..cbe15bbb 100644 --- a/compiler/lilypond.vim +++ b/compiler/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond compiler file " Language: LilyPond @@ -26,5 +21,3 @@ setlocal makeprg=lilypond\ $* " (how to see multiple-line error messages?) setlocal errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m " - -endif diff --git a/compiler/ls.vim b/compiler/ls.vim index d177eaa3..69c6977f 100644 --- a/compiler/ls.vim +++ b/compiler/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " Maintainer: George Zahariev @@ -81,5 +76,3 @@ augroup LiveScriptUpdateMakePrg autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/mix.vim b/compiler/mix.vim index 9ba5216b..e9e781c5 100644 --- a/compiler/mix.vim +++ b/compiler/mix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/mix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('current_compiler') finish @@ -23,5 +18,3 @@ CompilerSet errorformat= \%E==\ Compilation\ error\ in\ file\ %f\ ==, \%C**\ (%\\w%\\+)\ %f:%l:\ %m,%Z - -endif diff --git a/compiler/nim.vim b/compiler/nim.vim index 1b8c21b1..e7ed6936 100644 --- a/compiler/nim.vim +++ b/compiler/nim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/nim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 if exists('current_compiler') finish @@ -32,5 +27,3 @@ unlet s:cpo_save let g:syntastic_nim_checkers = ['nim'] - -endif diff --git a/compiler/nix-build.vim b/compiler/nix-build.vim index 0eb5f694..89a2453b 100644 --- a/compiler/nix-build.vim +++ b/compiler/nix-build.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/nix-build.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 if exists('current_compiler') finish @@ -18,5 +13,3 @@ endif CompilerSet errorformat=error:\ %m\ at\ %f:%l:%c,builder\ for\ \'%m\'\ failed\ with\ exit\ code\ %n,fixed-output\ derivation\ produced\ path\ \'%s\'\ with\ %m CompilerSet makeprg=nix-build - -endif diff --git a/compiler/ocaml.vim b/compiler/ocaml.vim index a9170be5..92582d67 100644 --- a/compiler/ocaml.vim +++ b/compiler/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim Compiler File " Compiler: ocaml @@ -63,5 +58,3 @@ CompilerSet errorformat = let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/powershell.vim b/compiler/powershell.vim index 9cab203c..e4d5d410 100644 --- a/compiler/powershell.vim +++ b/compiler/powershell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/powershell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Compiler: powershell " Run ps1 scripts in powershell and process their output. Quickly jump through @@ -90,5 +85,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/python.vim b/compiler/python.vim index 1a82a1cd..670ebdb4 100644 --- a/compiler/python.vim +++ b/compiler/python.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/python.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python-compiler', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 " Vim compiler file " Compiler: Unit testing tool for Python @@ -74,5 +69,3 @@ else endif " vim:foldmethod=marker:foldlevel=0 - -endif diff --git a/compiler/rake.vim b/compiler/rake.vim index acd08a35..f8c3186c 100644 --- a/compiler/rake.vim +++ b/compiler/rake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Rake @@ -46,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rspec.vim b/compiler/rspec.vim index c3b4ea0e..c443c735 100644 --- a/compiler/rspec.vim +++ b/compiler/rspec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rspec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: RSpec @@ -42,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/ruby.vim b/compiler/ruby.vim index 8f0127c9..53dc0106 100644 --- a/compiler/ruby.vim +++ b/compiler/ruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Ruby @@ -51,5 +46,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rubyunit.vim b/compiler/rubyunit.vim index 417b49c3..eb6c3d8e 100644 --- a/compiler/rubyunit.vim +++ b/compiler/rubyunit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rubyunit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Test::Unit - Ruby Unit Testing Framework @@ -42,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rustc.vim b/compiler/rustc.vim index f9953732..66827050 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rustc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim compiler file " Compiler: Rust Compiler @@ -64,5 +59,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/sass.vim b/compiler/sass.vim index bf02fa84..5a1ee532 100644 --- a/compiler/sass.vim +++ b/compiler/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim compiler file " Compiler: Sass @@ -37,5 +32,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/sbt.vim b/compiler/sbt.vim index 7bb2b1f9..15f81ff3 100644 --- a/compiler/sbt.vim +++ b/compiler/sbt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/sbt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim compiler file " Language: Scala SBT (http://www.scala-sbt.org/) @@ -37,5 +32,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/compiler/swift.vim b/compiler/swift.vim index 441d7b2f..39dbe99a 100644 --- a/compiler/swift.vim +++ b/compiler/swift.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 " Vim compiler file " Compiler: Swift Compiler @@ -46,5 +41,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/tcl.vim b/compiler/tcl.vim index 184e17bb..c73d69d5 100644 --- a/compiler/tcl.vim +++ b/compiler/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim compiler file " Compiler: tcl @@ -24,5 +19,3 @@ endif CompilerSet makeprg=tcl CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# - -endif diff --git a/compiler/tex.vim b/compiler/tex.vim index 6d50eacd..7076d04a 100644 --- a/compiler/tex.vim +++ b/compiler/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " Vim compiler file " Compiler: TeX @@ -74,5 +69,3 @@ CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m, let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/compiler/tidy.vim b/compiler/tidy.vim index 380c8d88..7f7f12af 100644 --- a/compiler/tidy.vim +++ b/compiler/tidy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tidy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tidy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tidy') == -1 " Vim compiler file " Compiler: HTML Tidy @@ -26,5 +21,3 @@ CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S " 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%.%# - -endif diff --git a/compiler/typescript.vim b/compiler/typescript.vim index de3f1f0a..d004226c 100644 --- a/compiler/typescript.vim +++ b/compiler/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 if exists('current_compiler') finish @@ -28,5 +23,3 @@ endif let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %' CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m - -endif |