Open akamud opened 5 years ago
@akamud For the workaround, under editor.tokenColorCustomizations
, how would I specify a different color for different themes? For example I would like to keep #98C379
for Atom One Dark Theme but would like to choose a darker color for when I switch to Atom One Light Theme. Is this possible, or would the same color be used for every theme?
(Cool! GitHub automatically shows the color after a hex code! #BADA55
)
Hi @chharvey, you can do this like this:
"editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"textMateRules": [
{
"scope": "markup.inline.raw.string.markdown",
"settings": {
"foreground": "#98C379"
}
}
]
},
Only the matched theme will be affected.
@akamud Thanks for your quick response! Sorry to bother you again, but I just thought of another question: Is there a way to select multiple themes and have that set of rules apply to both? For example, I would like "fontStyle": "italic"
for both Atom One Dark and Atom One Light, but not any of the other themes. So I would like to try:
"editor.tokenColorCustomizations": {
"[Atom One Dark, Atom One Light]": {
"textMateRules": [
{
"scope": "markup.inline.raw.string.markdown",
"settings": {
"fontStyle": "italic",
},
},
],
},
},
However this did not work. I also tried "[Atom One Dark], [Atom One Light]"
and that didn’t work either. Is there a way to have multiple selectors (like in CSS), or do I need to do each one separately?
"editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"textMateRules": [
{
"scope": "markup.inline.raw.string.markdown",
"settings": {
"fontStyle": "italic",
},
},
],
},
"[Atom One Light]": {
"textMateRules": [
{
"scope": "markup.inline.raw.string.markdown",
"settings": {
"fontStyle": "italic",
},
},
],
},
},
Thanks again for your help.
Not that I'm aware of. As far as I know, the customization accepts only one theme at a time.
Love your theme, Mahmoud! What is the exact reason that One Dark cannot properly style inline strings?
Love your theme, Mahmoud! What is the exact reason that One Dark cannot properly style inline strings?
I just have to make a new release with this fix. But in the meantime you can use the proposed workaround:
"editor.tokenColorCustomizations": {
"[Atom One Dark]": {
"textMateRules": [
{
"scope": "markup.inline.raw.string.markdown",
"settings": {
"foreground": "#98C379"
}
}
]
}
Sample code
Filename and Language selected
README.md
, MarkdownVSCode theme Screenshot
Versions used
Extra information
Workaround: