Open
Description
Given Get-ChildItem -Path . -Recurse
I cannot find a way to highlight "Path" and "Recurse". Currently I've only managed to highlight the -
. The same goes for say "regex" in switch -Regex () {}
.
It's gross but surly something like \\s\\-(?!(?i:[ic]?(?:eq|ne|gt|lt|ge|le|not|isnot|is|f|as|like|notmatch|match|notcontains|contains|in|and|or|xor|join|split|band|bor|bnot|bxor|replace))\\s)\\w+
would cover it? Provided it didn't step on constant.numeric
and override negative integer highlighting.
Playing around on my own computer and adding this to powershell.tmLanguage.json:
{
"match": "\\s\\-(?!(?i:[ic]?(?:eq|ne|gt|lt|ge|le|not|isnot|is|f|as|like|notmatch|match|notcontains|contains|in|and|or|xor|join|split|band|bor|bnot|bxor|replace))\\s)\\w+",
"name": "variable.parameter.powershell"
},
I get the desired result although there may be edge cases I am not considering...