问题
Could some one explain to me please how to customize docstring color for Python in VSCode's default theme? I want to do it thru User Settings because want to be able to save my config file.
I tried to use "editor.tokenColorCustomizations": {} but it affects all strings.
回答1:
Add this to your setting file:
<!-- language: json -->
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope":"string.quoted.docstring.multi.python",
"settings": {
"foreground": "#69676c" //change to your preference
}
}
]
}
additional info:
for finding out the scope of other element, you use the command Developer: Inspect TM Scopes
, as described here https://github.com/Microsoft/vscode/pull/29393
more detail: https://code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme
来源:https://stackoverflow.com/questions/46689334/how-to-customize-docstring-color-for-python-in-vscodes-default-theme