Skip to content
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

Differentiate const and let #6

Open
nonameolsson opened this issue May 9, 2023 · 11 comments
Open

Differentiate const and let #6

nonameolsson opened this issue May 9, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@nonameolsson
Copy link

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 nonameolsson added the enhancement New feature or request label May 9, 2023
@timnarr
Copy link
Owner

timnarr commented May 10, 2023

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?

@nonameolsson
Copy link
Author

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! 👏🏻

@timnarr
Copy link
Owner

timnarr commented May 12, 2023

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",
          }
        }
      ],
    },
  },

@nonameolsson
Copy link
Author

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? :)

@timnarr
Copy link
Owner

timnarr commented May 15, 2023

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

@nonameolsson
Copy link
Author

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

So strange. I'm using just Valley.
image

What could be wrong?

@nonameolsson
Copy link
Author

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 🙂

@timnarr
Copy link
Owner

timnarr commented Nov 10, 2023

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",
          }
        }
      ],
    },
  },

@nonameolsson
Copy link
Author

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!

@timnarr
Copy link
Owner

timnarr commented Nov 13, 2023

@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

@nonameolsson
Copy link
Author

nonameolsson commented Nov 15, 2023

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants