question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[themes] Disable Italic Option Feature Request

See original GitHub issue
  • VSCode Version: 1.15.0
  • OS Version: Windows 10 Version 1703 Build 15063.540

Steps to Reproduce:

Reproduces without extensions: Yes/No

Sometimes authors of themes use italic for comments, language keywords and for other things. In some cases that’s looks not so good (as example what I mean you can read my issue/feature-request on Material Theme https://github.com/equinusocio/vsc-material-theme/issues/81). Of course we can change this in theme source code manually but it will be great to have Disable Italic Option in vscode config file.

For example in Sublime Text 3 we have no_italic font option to disable italic at all:

"font_options":
[
	"no_italic"
],

Related issue: https://github.com/Microsoft/vscode/issues/25895

Fira Code don’t have Italic too.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:139
  • Comments:37 (3 by maintainers)

github_iconTop GitHub Comments

348reactions
mohouyizmecommented, Apr 29, 2018

It’s not a dynamic way but add those lines to your vs code settings:

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": [
        "comment",
        "comment.block",
        "comment.block.documentation",
        "comment.line",
        "constant",
        "constant.character",
        "constant.character.escape",
        "constant.numeric",
        "constant.numeric.integer",
        "constant.numeric.float",
        "constant.numeric.hex",
        "constant.numeric.octal",
        "constant.other",
        "constant.regexp",
        "constant.rgb-value",
        "emphasis",
        "entity",
        "entity.name",
        "entity.name.class",
        "entity.name.function",
        "entity.name.method",
        "entity.name.section",
        "entity.name.selector",
        "entity.name.tag",
        "entity.name.type",
        "entity.other",
        "entity.other.attribute-name",
        "entity.other.inherited-class",
        "invalid",
        "invalid.deprecated",
        "invalid.illegal",
        "keyword",
        "keyword.control",
        "keyword.operator",
        "keyword.operator.new",
        "keyword.operator.assignment",
        "keyword.operator.arithmetic",
        "keyword.operator.logical",
        "keyword.other",
        "markup",
        "markup.bold",
        "markup.changed",
        "markup.deleted",
        "markup.heading",
        "markup.inline.raw",
        "markup.inserted",
        "markup.italic",
        "markup.list",
        "markup.list.numbered",
        "markup.list.unnumbered",
        "markup.other",
        "markup.quote",
        "markup.raw",
        "markup.underline",
        "markup.underline.link",
        "meta",
        "meta.block",
        "meta.cast",
        "meta.class",
        "meta.function",
        "meta.function-call",
        "meta.preprocessor",
        "meta.return-type",
        "meta.selector",
        "meta.tag",
        "meta.type.annotation",
        "meta.type",
        "punctuation.definition.string.begin",
        "punctuation.definition.string.end",
        "punctuation.separator",
        "punctuation.separator.continuation",
        "punctuation.terminator",
        "storage",
        "storage.modifier",
        "storage.type",
        "string",
        "string.interpolated",
        "string.other",
        "string.quoted",
        "string.quoted.double",
        "string.quoted.other",
        "string.quoted.single",
        "string.quoted.triple",
        "string.regexp",
        "string.unquoted",
        "strong",
        "support",
        "support.class",
        "support.constant",
        "support.function",
        "support.other",
        "support.type",
        "support.type.property-name",
        "support.variable",
        "variable",
        "variable.language",
        "variable.name",
        "variable.other",
        "variable.other.readwrite",
        "variable.parameter"
      ],
      "settings": {
        "fontStyle": ""
      }
    }
  ]
}
180reactions
mohouyizmecommented, Mar 14, 2018

Here is a simple way to find the scopes to add them to this list:

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": [
         // Add scopes name to this array
      ],
      "settings": {
        "fontStyle": ""
      }
    }
  ]
}

First focus your mouse on the italic or bold word:

screenshot_1

Then open the Command Palette

screenshot_2

Search for: “Developer: Inspect TM Scopes”

screenshot_3

It will appear a popup contains some information about the scope

screenshot_5

Add the highlighted part to the scope array mentioned above

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": [
         "meta.import variable.other.readwrite",
         "other scopes ..."
      ],
      "settings": {
        "fontStyle": ""
      }
    }
  ]
}

Finally you can find me on twitter: @mohouyizme

GIF

Read more comments on GitHub >

github_iconTop Results From Across the Web

Options - Froala
Disable or enable using the CodeMirror library to highlight the HTML view. Note: This option requires the CodeMirror library to be included.
Read more >
RichText Reference | Block Editor Handbook
RichText is a component that allows developers to render a contenteditable input, providing users with the option to format block content to…
Read more >
Italic/bold not working - Technical Support - Sublime Forum
I can't get italic or bold fonts to work in Sublime Text 3 (build 3114). This is my current settings: "font_face": "Operator Mono...
Read more >
Support for Faux-italics - Adobe XD: Feature Requests
Please add faux-italics. As of now you cannot make text italicized unless there is an italics version of the font being used.
Read more >
Customizing VS Code's appearance — A deep ... - YouTube
An in-depth look at customizing the appearance of VS Code, with a focus on themes and fonts.First we'll cover basic customization including ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found