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
Improve syntax coloring definition to meet the standards of PowerShell ISE, Visual Studio #199
I compare VSCode coloring with Visual studio with different themes and observed that the cmdlet, parameter name and values are not following correct pattern.
Actual:
With Light (Visual Studio) and Dark+ (Default Dark) themes the PS comdlet , parameter and parameter value are displaying in the same color.
When multiple parameters are provide with the command then they are displaying in the different color.
Exp: In the below screenshot you can see -class and -computer is displaying in different color and Win32_OperatingSystem and localhost are displaying in different color.
Expected: Cmdlet, parameter and value should be display in three different colors and should be consistent in the script file same like visual studio.
Hey Pavan, the problems you see with VS Code's syntax highlighting for PowerShell come from the TextMate syntax definition we borrowed from Sublime Text which is based purely on regular expressions. We won't be able to keep 100% consistency with Visual Studio and the PowerShell ISE because VS Code does not allow us to implement a custom classifier based on the PowerShell parser.
That said, we need to improve the syntax definition to be more consistent with what users expect. We've got a plan to take over maintenance of the TextMate syntax definition that we use so that we can improve the quality of its colorization, it just may take a little while before we get to it.
changed the title [-]Coloring format is messed up with different VScode theme for PS cmdlets, parameter name and value.[/-][+]Improve syntax coloring definition to meet the standards of PowerShell ISE, Visual Studio[/+]on May 23, 2016
That'd be fantastic! Would love some help on that. I need to create a GitHub repo for the common syntax coloring definition used across VS Code, Sublime Text and Atom. I'll get that started today.
Activity
daviwil commentedon May 23, 2016
Hey Pavan, the problems you see with VS Code's syntax highlighting for PowerShell come from the TextMate syntax definition we borrowed from Sublime Text which is based purely on regular expressions. We won't be able to keep 100% consistency with Visual Studio and the PowerShell ISE because VS Code does not allow us to implement a custom classifier based on the PowerShell parser.
That said, we need to improve the syntax definition to be more consistent with what users expect. We've got a plan to take over maintenance of the TextMate syntax definition that we use so that we can improve the quality of its colorization, it just may take a little while before we get to it.
[-]Coloring format is messed up with different VScode theme for PS cmdlets, parameter name and value.[/-][+]Improve syntax coloring definition to meet the standards of PowerShell ISE, Visual Studio[/+]gravejester commentedon May 24, 2016
I'd love to help out with this one David Wilson (@daviwil).
daviwil commentedon May 24, 2016
That'd be fantastic! Would love some help on that. I need to create a GitHub repo for the common syntax coloring definition used across VS Code, Sublime Text and Atom. I'll get that started today.
gravejester commentedon May 24, 2016
Nice, let me know when you have it set up and I'll start taking a look at it. :)
vors commentedon May 24, 2016
Excellent, lets do it!
For sublime side of things see SublimeText/PowerShell#148