Skip to content

Parameters are shown using variables-color #203

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

Closed
fflaten opened this issue Mar 2, 2021 · 7 comments
Closed

Parameters are shown using variables-color #203

fflaten opened this issue Mar 2, 2021 · 7 comments

Comments

@fflaten
Copy link

fflaten commented Mar 2, 2021

Environment

  • Editor and Version (VS Code, Atom, Sublime): VS Code
  • Your primary theme: One Dark Pro

Issue Description

While semantic highlighting is enabled (theme default), parameters are shown using the same color as the variables, making it hard to split parameter from value. Literals are shown using their separate color as expected.

Also tested with Powershell ISE theme.

Screenshots

Semantic highlighting enabled:
image
image

Expected Behavior

Variables and parameters should have different colors like before.

Semantic highlighting disabled in settings:
image
image

Code Samples

Get-ChildItem -Path $path -Filter $filter -Include 'literal value'
@bitdeft
Copy link

bitdeft commented Mar 2, 2021

I came here to echo this issue. This seems to be related to the new semantic highlighting feature.
Please update it so that the parameters use white or grey as they before.

Primary Theme: Dark+

@msftrncs
Copy link
Contributor

msftrncs commented Mar 3, 2021

white or grey is not the correct color! That is a lack of color, and was caused by EditorSyntax choosing no scoping for those tokens.

However, that is up to your theme to choose the color, not for either EditorSyntax or the semantic tokenizer. They only specify what an object is.

Here's how mine looks: (without semantic highlighting, and a custom PS grammar)
image

@msftrncs
Copy link
Contributor

msftrncs commented Mar 3, 2021

Also, semantic token highlighting issues need to be taken over to https://github.com/PowerShell/vscode-powershell. The semantic tokenizing is handled in the PowerShell extension, not in the basic language syntaxing module here. The PowerShell ISE Theme also comes from there as well.

@fflaten
Copy link
Author

fflaten commented Mar 3, 2021

@msftrncs I'm not sure how the picture of your theme without semantic helps. Maybe most/all themes forgot to color the parameters before, but the end result is that it worked. The issue is only when semantic is enabled. Are we sure the themes can separate the token types?

I was redirected here for "editor syntax colorization issues" in vscode-powershell's new issue template-menu. If that's wrong, you might want to make them rephrase or change that, because atm you both point at each other.

@fflaten
Copy link
Author

fflaten commented May 16, 2021

Related PowerShell/vscode-powershell#3221

@andyleejordan
Copy link
Member

@fflaten I've updated our FAQ to clarify the interaction between the extension's highlighting and the highlighting grammar (this repo): https://github.com/PowerShell/vscode-powershell/blob/master/docs/troubleshooting.md#problems-with-syntax-highlighting

Funnily enough, I've also updated the issue form on the extension...but GitHub still hasn't added us to the beta for new issue forms so it's still a draft PR: PowerShell/vscode-powershell#3332

@fflaten
Copy link
Author

fflaten commented May 18, 2021

Thanks @andschwa. I also noticed that the editor syntax-redirect in the issue template is removed in vscode-powershell 👍
I've lately switched to Github Dark theme which works far better with semantic enabled. It has a lot more tokenColors defined which I guess help separate parameters and variables properly.
image

Haven't looked into which tokenColor that fixed it, but I guess this might now be more of a theme-issue with "PowerShell ISE".

Btw. didn't know about the issue forms private beta). They look awesome!

@fflaten fflaten closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants