mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -30,7 +30,7 @@ if !g:ledger_is_hledger
|
||||
CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m
|
||||
" Skip all other lines:
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . expand('g:ledger_main::S') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . expand('g:ledger_main::S')
|
||||
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main))
|
||||
else
|
||||
exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . expand('g:ledger_main::S') . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g') . '\ >\ /dev/null)'
|
||||
exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)'
|
||||
endif
|
||||
|
||||
@@ -33,14 +33,36 @@ endif
|
||||
|
||||
if !executable(g:ps1_makeprg_cmd)
|
||||
echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Show CategoryInfo, FullyQualifiedErrorId, etc?
|
||||
let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
|
||||
|
||||
let &l:makeprg = g:ps1_makeprg_cmd
|
||||
" Load Vanilla Shell and show syntax errors
|
||||
" See https://zigford.org/powershell-syntax-now-supported-by-ale-vim-plugin.html
|
||||
if has('win32')
|
||||
setlocal makeprg+=\ -NoProfile\ -NoLogo\ -NonInteractive\ -command\ \"&{
|
||||
\trap{$_.tostring();continue}&{
|
||||
\[void]$executioncontext.invokecommand.invokescript('%')
|
||||
\}
|
||||
\}\"
|
||||
elseif has('unix')
|
||||
setlocal makeprg+=\ -NoProfile\ -NoLogo\ -NonInteractive\ -command\ "&{
|
||||
\trap{\\$_.tostring();continue}&{
|
||||
\[void]\\$executioncontext.invokecommand.invokescript('%')
|
||||
\}
|
||||
\}"
|
||||
\}\"
|
||||
else
|
||||
echoerr "To use the powershell compiler, please run it under Microsoft Windows or Unix!"
|
||||
finish
|
||||
endif
|
||||
" 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'
|
||||
setlocal makeprg+=\ %:p:S
|
||||
silent CompilerSet makeprg
|
||||
|
||||
" Parse file, line, char from callstacks:
|
||||
" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
|
||||
|
||||
Reference in New Issue
Block a user