This commit is contained in:
Adam Stankiewicz
2020-04-14 13:17:26 +02:00
parent e86e0ad36e
commit 14dc82fc4e
58 changed files with 1505 additions and 666 deletions

View File

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