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
{{ message }}
Repository navigation
Syntax checker does not work with workspaces in PowerShell #495
have MS PowerShell as the shell in which vim runs (e.g. $Env:ComSpec=C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\powershell.exe)
" in .vimrc" Set Powershell as the shell of choicelet &shell=has('win32') ? 'powershell' : 'pwsh'let &shellcmdflag='-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'let &shellredir='2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'let &shellpipe='2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'setshellquote=\"shellxquote=setnoshelltemp
have a rust project with a workspace
edit a file inside the workspace (e.g. a .rs file inside the embedded library) so that syntax-checkers/rust/cargo.vim would have to enter this fork of the cargo.vim script
save the .rs source file so that rust syntax-checker runs
Expected vs. actual behavior:
Actual:
This happens because PowerShell does not chain commands with && like other shells, so it errors out at (cd <path> && cargo check)
Expected:
Chain commands with ; if Powershell is used.
I corrected it for myself like this (replaced && with ) ; () in here:
Activity