Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class keyword is incorrectly colored when used as a parameter #43

Closed
pcgeek86 opened this issue Mar 23, 2017 · 3 comments
Closed

Class keyword is incorrectly colored when used as a parameter #43

pcgeek86 opened this issue Mar 23, 2017 · 3 comments
Labels
Projects
Milestone

Comments

@pcgeek86
Copy link

Here is a specific, reproducible example where the class keyword is improperly colored in Visual Studio Code.

Example Code

function Test-Function {
  [CmdletBinding()]
  param (
    [string] $Class
  )
}

### Notice the blue color of "Class", indicating that it is a reserved language keyword.
Test-Function -Class asdf

### Notice how the "-Name" parameter is colored differently than "-Class" above
Get-Process -Name asdf

Screenshot of Result

screen shot 2017-03-23 at 7 17 49 am

Diagnostic Details

➜  ~ code --list-extensions --show-versions
Alexander.theme-sublime-oceanicnext@0.0.3
Nuuf.theme-hackershaze@1.3.1
PeterJausovec.vscode-docker@0.0.13
abusaidm.html-snippets@0.1.0
akamud.vscode-theme-onedark@1.3.1
aws-scripting-guy.cform@0.0.9
azemoh.one-monokai@0.2.4
christian-kohler.npm-intellisense@1.3.0
donjayamanne.python@0.6.0
ecmel.vscode-html-css@0.0.33
eg2.vscode-npm-script@0.1.8
fknop.vscode-npm@3.3.0
jakeboone02.mediawiki@2.1.0
jprestidge.theme-material-theme@1.0.1
ms-vscode.PowerShell@0.10.1
ms-vscode.csharp@1.8.0
searKing.preview-vscode@1.1.4
➜  ~ code -v
1.10.2
8076a19fdcab7e1fc1707952d652f0bb6c6db331
➜  ~ powershell -Command '$PSversionTable'

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.17
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Cheers,
Trevor Sullivan

@pcgeek86 pcgeek86 changed the title Class keyword is incorrectly colored when Class keyword is incorrectly colored when used as a parameter Apr 5, 2017
@gravejester gravejester added this to the v2 milestone Sep 4, 2017
@gravejester gravejester added this to Bugs - Open in v2 Sep 4, 2017
@gravejester gravejester self-assigned this Sep 4, 2017
@omniomi
Copy link
Collaborator

omniomi commented May 21, 2018

Need to add a negative lookbehind for - on the class match.

@kborowinski
Copy link
Contributor

@omniomi I guess we can close that one Nick.

@omniomi
Copy link
Collaborator

omniomi commented May 29, 2018

Resolved by @kborowinski in #99

@omniomi omniomi closed this as completed May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
v2
Bugs - Open
Development

No branches or pull requests

4 participants