0

example

One day, the color """ """ string when comment color somehow got turned to dark green. While the string color remain light orange. I had try to change comments' color in settings, but it only effect the # comment.

"editor.fontLigatures": false,
"workbench.colorTheme": "Default Dark+",

"editor.tokenColorCustomizations":{
    "comments":"#a1b876",
}

how do I change the color of """ """ string when comment to custom color or at least normal string color?

PeiPeiRin
  • 7
  • 5

1 Answers1

0

""" is not a comment, it's still a string.

As for why the two triple-quote strings in the picture have different colors, because hhh is recognized as a docstring.

enter image description here

You can change the color with the following settings

    "editor.tokenColorCustomizations": {
        "[Default Dark+]": {
            "textMateRules": [
                {
                    "name": "docstring",
                    "scope": "string.quoted.docstring.multi.python",
                    "settings": {
                        "foreground": "#FF0000"
                    }
                },
                {
                    "name": "string",
                    "scope": "string.quoted.multi.python",
                    "settings": {
                        "foreground": "#0de711"
                    }
                }
            ]
        }
    }

enter image description here

JialeDu
  • 6,021
  • 2
  • 5
  • 24