diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-14 13:17:26 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-14 13:17:26 +0200 |
commit | 14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (patch) | |
tree | dea8d2398a9377a0eee7786776e3cd420ce1ee89 /compiler | |
parent | e86e0ad36ef9501acbc3e8c63a1d4fab104e47cb (diff) | |
download | vim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.tar.gz vim-polyglot-14dc82fc4e6c0c08078f97a24a6c1639c1cc5113.zip |
Update
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ocaml.vim | 3 | ||||
-rw-r--r-- | compiler/powershell.vim | 15 | ||||
-rw-r--r-- | compiler/rustc.vim | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/compiler/ocaml.vim b/compiler/ocaml.vim index 0f64c8a0..c8fa745e 100644 --- a/compiler/ocaml.vim +++ b/compiler/ocaml.vim @@ -5,9 +5,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Maintainer: Markus Mottl <markus.mottl@gmail.com> " URL: http://www.ocaml.info/vim/compiler/ocaml.vim " 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, @@ -33,6 +33,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/compiler/powershell.vim b/compiler/powershell.vim index 4d9d76b0..1737a5a5 100644 --- a/compiler/powershell.vim +++ b/compiler/powershell.vim @@ -17,21 +17,28 @@ let s:cpo_save = &cpo set cpo-=C if !exists("g:ps1_makeprg_cmd") - if !has('win32') || executable('pwsh') + 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 - " powershell is Windows-only - let g:ps1_makeprg_cmd = 'powershell' + 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' +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 diff --git a/compiler/rustc.vim b/compiler/rustc.vim index 3c378850..14034ae4 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -26,7 +26,7 @@ else if has('patch-7.4.191') CompilerSet makeprg=rustc\ \%:S else - CompilerSet makeprg=rustc\ \% + CompilerSet makeprg=rustc\ \"%\" endif endif |