pouyakary / ProColors

A collection of coding themes for syntax highlighting and the editors that are designed to be available in dark and light modes with a very high precision of harmony and token definition coverage.
https://marketplace.visualstudio.com/items?itemName=karyfoundation.theme-karyfoundation-themes
GNU General Public License v3.0
110 stars 11 forks source link

Differentiate const and let #38

Closed nonameolsson closed 1 year ago

nonameolsson commented 1 year ago

Thanks for a great theme!

Would it be possible to adjust the colors for const and let variables in JavaScript/TypeScript? They use the same color right now.

Kary Pro Theme

Kary Pro Dark image

Kary Pro Light image

Other themes

Dark+ image

Dark+ V2 (Experimental) image

GitHub Dark Default image

Light+ image

Light+ V2 (Experimental) image

GitHub Light Default image

pouyakary commented 1 year ago

@nonameolsson this is interesting, let me try some variations on it and see if I'll add it to the theme. However I'm only adding it if the colors are consistent everywhere.

nonameolsson commented 1 year ago

Hey @pouyakary ! Have you had the opportunity to look into this? Is it something that you are willing to add?

pouyakary commented 1 year ago

Hey @nonameolsson, I have applied green to constants in JS/TS in ProColors, but I'm not sure if it works on all languages. So in the version 34.2 you'll get the update!

nonameolsson commented 1 year ago

This looks really good, just tested it! I'm just wondering about light theme. Is that version also including a different color for cont/let?

pouyakary commented 1 year ago

@nonameolsson Thanks a lot! I'm happy that you had fun!

Yes it does, Pro Colors is built with a tool called themeX which supports the idea of different palates implementing the same scope set. So the rules behind the Light and Dark themes are shared and then they only get the different colors based on the palates. And since the dark version has only a different shade of the light colors (blue, green, red, orange, purple, comment and gray) the two are exactly the same.

nonameolsson commented 1 year ago

That sounds interesting! 👍🏻

The reason I asked is that I can't see a difference in the light theme 😸 This is how I see it:

image image

Is this expected?

pouyakary commented 1 year ago

Oh good thing you asked it then. I must have messed up the build pipeline and it must have not updated the light version. Thanks for bringing it out. I'll fix it soon.

nonameolsson commented 11 months ago

Oh good thing you asked it then. I must have messed up the build pipeline and it must have not updated the light version. Thanks for bringing it out. I'll fix it soon.

Thanks for all the work on this! Did you manage to find a solution for the light theme?

pouyakary commented 5 months ago

@nonameolsson I'm afraid I'm going to have to revert this change. It has caused problems with my friends and now there is even an issue around it. So probably in the future versions, the colors will be turned back to blue. What you can do however is to define specifically in your vscode theme settings a different color for the constants and feel no change. Once I'll go to change the code I provide you with the settings that you can copy and paste in your editor.

jiayihu commented 5 months ago

I can see the original rational for the request to differentiate between const and let. My complaint is instead about the fact that now const has the same color as types, which is very confusing in TypeScript. Notably with renaming destructured variables, it's very easy to misread it as type:

Screenshot 2024-05-13 at 23 37 05

But I don't believe my view trumps over @nonameolsson 's request, especially since I'm the first to report it. If you can point me the setting @pouyakary I can just use that.

EDIT: With a bit of reverse engineering I found the setting:

"editor.tokenColorCustomizations": {
  "[Kary Pro Colors - Light]": {
    "textMateRules": [
      {
        "scope": "variable.other.constant",
        "settings": {
          "foreground": "#3778B7"
        }
      }
    ]
  },
  "[Kary Pro Colors - Dark]": {
    "textMateRules": [
      {
        "scope": "variable.other.constant",
        "settings": {
          "foreground": "#819DC2"
        }
      }
    ]
  }
},