You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If shell is set to PowerShell, the subshell command (here) will be parsed by PowerShell, which will throw an error when it tries to parse the redirection operator.
Reproducing the bug
This error should occur regardless of the file type/linter used, but you can download a standalone executable of luacheck here.
In init.vim:
set shell=powershell
let g:ale_lua_luacheck_executable = 'C:/path/to/luacheck.exe' "if you use luacheck for reproducing the bug
You can use the recommended powershell settings here, but I've found they interfere with some powershell commands. The error will still occur in any case.
Edit an appropriate file. I used a Lua file containing only x==1, which should throw a syntax error.
Check ALEInfo.
It was suggested that this is an escaping issue due to ALE's use of subshells here (ignore the bit about the parsing operator and ale_command_wrapper).
The commands need to be run in a subshell, especially if you're using PowerShell, which has different syntax. ALE wants to be use CMD syntax for all of the commands it runs. Using a subshell also fixes PATHEXT issues.
It looks like the lines you have written above will work.
Information
VIM version
NVIM v0.2.2
Build type: RelWithDebInfo
Operating System: WHAT OS WERE YOU USING?
Windows 7
:ALEInfo
https://gist.github.com/trv6/06cbf33f1655c673bca441756911d857
What went wrong
If
shell
is set to PowerShell, the subshell command (here) will be parsed by PowerShell, which will throw an error when it tries to parse the redirection operator.Reproducing the bug
This error should occur regardless of the file type/linter used, but you can download a standalone executable of luacheck here.
In
init.vim
:You can use the recommended powershell settings here, but I've found they interfere with some powershell commands. The error will still occur in any case.
x==1
, which should throw a syntax error.It was suggested that this is an escaping issue due to ALE's use of subshells here (ignore the bit about the parsing operator and ale_command_wrapper).
The modified block of ale/job.vim:
does work with both
cmd
andpowershell
, though the user who posted the solution recommended that ALE should use batch files instead of subshells.The text was updated successfully, but these errors were encountered: