valley-vscode icon indicating copy to clipboard operation
valley-vscode copied to clipboard

Differentiate const and let

Open nonameolsson opened this issue 1 year ago • 11 comments

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.

Valley

image

Other themes

Dark+ image

Dark+ V2 (Experimental) image

GitHub Dark Default image

Light+ image

Light+ V2 (Experimental) image

GitHub Light Default image

nonameolsson avatar May 09 '23 20:05 nonameolsson

Hi @nonameolsson,

thanks for your comment What exactly would you expect in Valley? My first idea was to have let in a lighter color than const. What do you think?

timnarr avatar May 10 '23 17:05 timnarr

Hi @nonameolsson,

thanks for your comment What exactly would you expect in Valley? My first idea was to have let in a lighter color than const. What do you think?

Thank you for an excellent theme! As you say, a lighter color for let is a good approach. I have compared a lot of themes, and only a few of them differentiates let from const. Those who differentiates those two are going with a lighter color for let. 👍🏻

Thanks for answering so quickly! 👏🏻

nonameolsson avatar May 12 '23 05:05 nonameolsson

Okay, I'm really unsure about what color it should be. Can you try adding this snippet to your settings.json file and see if this works for you? Maybe you can tweak the hex value and let me know, what is working for you?

Thanks for you help 🙂

  "editor.tokenColorCustomizations": {
    "[Valley]": {
      "textMateRules": [
        {
          "scope": [
            "variable.other.readwrite.js",
            "meta.block.js",
            "meta.function.js",
            "source.js"
          ],
          "settings": {
            "foreground": "#87A6AC",
          }
        }
      ],
    },
  },

timnarr avatar May 12 '23 19:05 timnarr

Thanks! I tried it but I didn't see any change actually. Probably I must have done something wrong. image

What am I doing wrong? :)

nonameolsson avatar May 12 '23 20:05 nonameolsson

Actually, everything looks correct 🤔 Or are you using Valley Italic?

timnarr avatar May 15 '23 14:05 timnarr

Actually, everything looks correct 🤔 Or are you using Valley Italic?

So strange. I'm using just Valley. image

What could be wrong?

nonameolsson avatar May 15 '23 15:05 nonameolsson

Actually, everything looks correct 🤔 Or are you using Valley Italic?

So strange. I'm using just Valley. image

What could be wrong?

Hello again! Any updates on this? I would really like to continue using Valley, it is one of y favourite themes 🙂

nonameolsson avatar Nov 10 '23 07:11 nonameolsson

Hi @nonameolsson it's hard to say and I'm really unsure why I choosed these scopes back than 😄

Can you try this this one please:

"editor.tokenColorCustomizations": {
    "[Valley]": {
      "textMateRules": [
        {
          "scope": [
            "variable.other.constant",
            "source.js",
          ],
          "settings": {
            "foreground": "#ff00aa",
          }
        }
      ],
    },
  },

timnarr avatar Nov 10 '23 08:11 timnarr

Hi @nonameolsson it's hard to say and I'm really unsure why I choosed these scopes back than 😄

Can you try this this one please:

"editor.tokenColorCustomizations": {
    "[Valley]": {
      "textMateRules": [
        {
          "scope": [
            "variable.other.constant",
            "source.js",
          ],
          "settings": {
            "foreground": "#ff00aa",
          }
        }
      ],
    },
  },

Thank you, that is working like a charm!

nonameolsson avatar Nov 13 '23 12:11 nonameolsson

@nonameolsson cool, glad to hear. Would you like to share what color you chose for const? By the way, you can discover Valley's colors here: https://calcolor.co/palette/915560412

timnarr avatar Nov 13 '23 12:11 timnarr

@nonameolsson cool, glad to hear. Would you like to share what color you chose for const? By the way, you can discover Valley's colors here: https://calcolor.co/palette/915560412

Thanks for your help! At the moment I'm using "Pinkish" (#d66a81). It works well 🙂

At the moment all the properties have the same color. image

This is how it looks in some other themes. image image

I have very limited experience with customising VS Code themes. Do you know the key to use if I would like to adjust this code syntax?

nonameolsson avatar Nov 15 '23 07:11 nonameolsson