EditorSyntax
EditorSyntax copied to clipboard
Possible updates for the new ternary operator added in PowerShell language
The ternary operator will soon be added to the PowerShell language, which may cause syntax colorization issue. Open this issue to track the possible changes needed in this repo.
Still problem with the ?
ternary operator
Fix coming soon?
Do you have the ternary operator on the same line as the expression?
$true ? "f" : "s"
Vs
$true
? "f" : "s"
It has to be on the same line.
it's like this $true ? "f" : "s"
@Satak What version of PowerShell are you using?
@Satak What version of PowerShell are you using?
Sorry my bad. I just realized that the default PS is set to 5.1 at VS Code. I have installed 7.1 to my machine and after switching Powershell to 7.1 it works. Is there a place to set the default PS to 7.1 in VS Code?
Do you see the version number at the bottom right when you have a PowerShell file open?
If you click on that, you can set which version you want to use. That will set the default.