zigford.org/powershell-syntax-now-supported-by-ale-vim-plugin.md
2020-07-21 06:49:32 +10:00

20 lines
711 B
Markdown

Powershell syntax now supported by ALE (Vim) plugin
[ALE][1] project has approved my PR to show powershell syntax errors by parsing
the powershell by powershell itself. If the current buffer has a filetype of
Powershell, the buffer is run through the following powershell script to check
for syntax errors. Errors are then displayed in Vim by ALE:
---
Param($Script)
trap {$_; continue } & {
$Contents = Get-Content -Path $Script;
$Contents = [string]::Join([Environment]::NewLine, $Contents);
[void]$ExecutionContext.InvokeCommand.NewScriptBlock($Contents);
};
Tags: ale, vim, powershell
[1]:https://github.com/w0rp/ale