Closed ghost closed 6 years ago
Can you try to set "fontStyle": ""
?
You know, I just found that out as you typed the comment. Thank you!
I feel this whole area is lacking in documentation, as the hint if you type an incorrect value doesn't mention leaving it empty to override it.
Seems logical to me to override only specified properties.
Validation probably disabled because values can be compound: "bold underline"
, "italic underline bold"
...
Some documentation is there: https://code.visualstudio.com/docs/extensions/themes-snippets-colorizers#_textmate-theme-rules https://code.visualstudio.com/blogs/2017/02/08/syntax-highlighting-optimizations#_textmate-themes
Probably can be validated against list:
""
"bold"
"underline"
"italic"
"bold italic"
"italic bold"
"bold underline"
"underline bold"
"italic underline"
"underline italic"
"bold italic underline"
"italic bold underline"
"underline bold italic"
"bold underline italic"
"italic underline bold"
"underline italic bold"
fontStyle
is an optional property. So it is valid to skip it. Skipping it means that you do not wish to overwrite the font style (i.e. you go with the settings defined in the theme). The same applies for foreground
, it is optional. Skipping it means that you do not wish to overwrite the color.
@aeschli For the schema considerations.
I will update the description for the property to mention the empty string. Note that we already document and validate all valid values:
Thanks all.
Why can't we change the fontFamily here? For example, I'd like to change the comparison operator to font Fira Code in order to turn on Ligatures just in this spot.
"editor.tokenColorCustomizations": {
"[Dark++ Italic]": {
"textMateRules": [
{
"name": "LigsArrow",
"scope": [
"keyword.operator.comparison",
"meta.block",
"meta.arrow",
"meta.var.expr",
"source"
],
"settings": {
"foreground": "#FF0000",
"fontFamily": "Fira Code"
}
},
(5 theme extensions excluded)
I am not seeing the fontStyle changes I am trying to apply. The Theme I use (Nord Extra Dark) has applied italics in some places, and I am trying to set them to normal instead. I have removed the
"fontStyle": "italic"
from each of the following yet there is no change in the editor.Is there a way to do this that will override a theme's choices? It seems simply not setting it is allowing the theme to rule in the case of
fontStyle
.Steps to Reproduce: