vscode-powershell
vscode-powershell copied to clipboard
The automatic variable $PSHOME is not highlighted
Prerequisites
- [x] I have written a descriptive issue title.
- [x] I have searched all open and closed issues to ensure it has not already been reported.
- [x] I have read the troubleshooting guide.
- [x] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- [x] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- [x] If this is a security issue, I have read the security issue reporting guidance.
Summary
I am experiencing a problem with syntax highlighting. I think $PSHOME should be highlighted but it is not.
PowerShell Version
7.5.0
Visual Studio Code Version
1.98.2
Extension Version
2025.0.0
Steps to Reproduce
Type $PSHOME in the Visual Studio Code Text Editor area.
Visuals
Logs
No response
Thanks for your submission!
Unfortunately that highlighting comes from a Textmate file that is very difficult to get changes pushed because it lands in the main vscode. Note that it is highlighted if semantic versioning is enabled, but that currently has some stability issues.
To be fair, that TextMate grammar is due for some TLC. Just very careful TLC.
the grammar file comes from here https://github.com/PowerShell/EditorSyntax/blob/main/PowerShellSyntax.tmLanguage
- https://github.com/PowerShell/EditorSyntax/issues/218
here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter