EditorSyntax icon indicating copy to clipboard operation
EditorSyntax copied to clipboard

Syntax Highlighting Only Helps differentiate between

Open ziabytes opened this issue 6 years ago • 2 comments
trafficstars

Environment

  • Editor and Version (VS Code, Atom, Sublime (tried in all 3 problem has been there for a year if not more)):
  • Your primary theme: Monokai

Issue Description

  • Syntactical components are not as distinguished by color as they should be.
  • Variables, Parameters/Switches, methods/properties all share the same color
  • Commands/Functions can be different colors after a pipe
  • Commands/Functions, Variables, Parameters/Switches, methods/properties should each have their own individual color
  • There seems to be another problem of inconsistency in color with $_ and $_.
  • Monokai was just one of the better ones, it was worse in most other themes, including the vscode default dark, and powershell ISE theme

Screenshots

image

Expected Behavior

  • Commands/Functions, Variables, Parameters/Switches, methods/properties should each have their own individual color REGARDLESS of theme

Code Samples


$variable  = (Select-Object -Property Item, "Item2").item[0] 
$variable.method | Where ($_.something -eq "$word")
$date = Get-Date
$date.day

ziabytes avatar Apr 17 '19 23:04 ziabytes

Commands/Functions, Variables, Parameters/Switches, methods/properties should each have their own individual color REGARDLESS of theme

That's impossible. Its the theme that sets the color, and most themes are only based on 4 or 5 (main) colors all together including text and numbers., and you haven't included language constants, keyword (primitive) types, etc. There is only so many colors to go around.

Can you possibly try out PR #155 or PR #156 and see if these meet your expectations? I have deviated from the expected scopes for some objects, so if these PR's were to be accepted its likely it would be with some changes. My sample images in those PR's use a custom theme that has around 8 or 9 colors. This theme can be found in my repositories. It is based on VS Code's Monokai Dimmed.

Example: image

msftrncs avatar Apr 18 '19 03:04 msftrncs

To include some shortcuts for reference: https://github.com/msftrncs/PowerShell.tmLanguage (VS Code ready JSON syntax file and some code samples, this is my primary work pad, changes occur here before they are committed to the PR's) https://github.com/msftrncs/theme-monokai-less-dimmed (VS Code theme repository, Monokai Less Dimmed)

The PR's mentioned are work in progress. There are some items I haven't touched yet. I haven't put nearly as much work in to PR 155 since I have been working on 156 which I think provides more desirable syntaxing.

msftrncs avatar Apr 18 '19 03:04 msftrncs