How to customize docstring color for Python in VSCode's default theme?

徘徊边缘 提交于 2019-12-10 21:37:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!