skip to Main Content

I have an annoying problem, which I cannot find a solution to.

I’m using VS Code + Jupyter as my go-to tool for python projects. I’ve found out how to customize all colours / styles in it, except for inline code render in markdown. See 2 examples below.

Does anyone know what are the properties (settings.json?) that I need to use to change background and border settings of how VS Code renders inline code?

Like this for example – grey background, no border.

This is markdown code

It renders like this in my selected theme

But this is how one of the default themes renders it

2

Answers


  1. Chosen as BEST ANSWER

    Found some additional functionality. As @JialeDu mentioned, it looks like there is no option to change border / background color of how inline code is rendered.

    However, you can change the render color. In setting.json under "workbench.colorCustomizations": you need to add:

    "workbench.colorCustomizations": {
        "textPreformat.foreground": "#deba7bf5"
    },
    

    where #deba7bf5 is a color you can pick.


  2. The code style in the editor can be modified by the following configuration.

    // settings.json file
    "editor.tokenColorCustomizations": {
        "[Default High Contrast]": {
            "textMateRules": [
                {
                    "scope":"markup.inline.raw",
                    "settings": {
                        "foreground": "#00ff95",
                        "fontStyle": "bold"
                    }
                },
            ]
        },
    }
    

    Original theme style:

    enter image description here

    Theme: Dark High Contrast

    After adding configuration:

    enter image description here

    Theme: Dark High Contrast

    However, the interface style finally presented by Markdown is different under each theme, and no way to modify it has been found yet.

    enter image description here

    Theme: Dark High Contrast

    enter image description here

    Theme: Quiet Light

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search