PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
131 stars 42 forks source link

Syntax Highlighting Only Helps differentiate between #163

Open ziabytes opened 5 years ago

ziabytes commented 5 years ago

Environment

Issue Description

Screenshots

image

Expected Behavior

Code Samples


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

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 commented 5 years ago

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.