PowerShell / PowerShell/vscode-powershell
Version v2021.2.2 doesn't highlight the #Requires statements
Open
@andyleejordan is already working on this.
Since Mar 3, 2021.
Area-Semantic Highlighting
Issue-Bug
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Editor and Version (VS Code, Atom, Sublime): VSCode 1.53.2
- Your primary theme: Dark+ (default dark)
Issue Description
I just opened some PowerShell scripts and the extension got updated. Right in front of my eyes, I had some #requires statements and they got their highlight stripped off.
Screenshots

Expected Behavior

The only Theme which still highlights those statements that I found is Night Owl. I have like 10 themes installed and went through all of them and the Night Owl is the only one.
Code Samples
# Az modules
#Requires -Module @{ ModuleName = 'Az.Accounts'; RequiredVersion = '1.9.5' }
#Requires -Module @{ ModuleName = 'Az.ApplicationInsights'; RequiredVersion = '1.1.0' }
#Requires -Module @{ ModuleName = 'Az.Compute'; RequiredVersion = '4.5.0' }
#Requires -Module @{ ModuleName = 'Az.Network'; RequiredVersion = '3.5.0' }
#Requires -Module @{ ModuleName = 'Az.Resources'; RequiredVersion = '2.5.1' }
#Requires -Module @{ ModuleName = 'Az.ServiceBus'; RequiredVersion = '1.4.1' }
#Requires -Module @{ ModuleName = 'Az.Storage'; RequiredVersion = '2.7.0' }
#Requires -Module @{ ModuleName = 'Az.Websites'; RequiredVersion = '1.11.0' }
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.