How can I get VS's python syntax highlighting in VS code?

前端 未结 7 1067
终归单人心
终归单人心 2021-02-08 14:20

It seems like VS Community with python tools has a better syntax highlighting than VS Code with \"Python\" by Don Jayamanne. As you can see in the picture attached, VS Community

7条回答
  •  囚心锁ツ
    2021-02-08 14:25

    Looks like this issue has been bouncing around between maintainers of VSCode, MagicPython, and the Python extension

    A quick workaround is to simply override your color theme as instructed here. For example, if you are using Default Dark+ color theme, you can add this to settings.json:

    "editor.tokenColorCustomizations": {
        "textMateRules": [
          {
            "scope": "meta.function-call.generic.python",
            "settings": {
              "foreground": "#DCDCAA"
            }
          }
        ]
      },
    

    Now callables are highlighted correctly as seen below:

提交回复
热议问题