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

custom themes lack match and case syntax highlighting #3223

Closed
scarf005 opened this issue Aug 21, 2022 · 6 comments
Closed

custom themes lack match and case syntax highlighting #3223

scarf005 opened this issue Aug 21, 2022 · 6 comments
Labels
waiting for user response Requires more information from user

Comments

@scarf005
Copy link

default themes and github themes support match case syntax, however majority of other themes does not support them out of the box.

running Inspect editor tokens and scopes shows result like this:
_01

_02

could there be any way to overwrite custom themes to support match case?
(using editor.tokenColorCustomizations for every single themes would too much work)

Originally posted by @scarf005 in #1215 (comment)

@rchiodo
Copy link
Contributor

rchiodo commented Nov 15, 2022

I'm not sure what the ask is here? Themes can provide their own colors for keyword.

Here's an example:

  "editor.semanticTokenColorCustomizations": {
    "[Default Light+]": {
      "rules": {
        // Make keywords green
        "keyword": "#00ff26"
      }
    }
  },

Which produces:

Image

Are you asking for a different token specific to 'match' and 'case'?

@rchiodo rchiodo closed this as completed Nov 15, 2022
@scarf005
Copy link
Author

scarf005 commented Nov 16, 2022

then why are match/case not identified as keyword?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 16, 2022

Do you have a specific case where that happens? I can't repro your first screen shot.

@congard
Copy link

congard commented Sep 8, 2023

It seems that in certain themes, such as for example One Monokai, Monokai Night or Darcula match and case are not identified as keyword. Is it an issue with pylance or with the aforementioned themes?

Darcula:
Screenshot_20230908_155915

Dark Modern:
Screenshot_20230908_155954

@rchiodo
Copy link
Contributor

rchiodo commented Sep 8, 2023

Pylance (and the tmlanguage grammar that ships with VS code) knows nothing of the theme being used. My guess is that the theme is not defining a color for the token, or is overriding it somehow.

@MicBotta
Copy link

Hi,
I had the same problem with Dracula Theme and solved by enabling the Semantic Highlighting. You have to add this entries in the settings.json file:

"editor.semanticTokenColorCustomizations": {
"[Darcula Theme]": {
"enabled": true
},
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

5 participants