VSCode Pylance 更改了文本颜色

VSCode Pylance changed text color

我刚刚在 VisualStudioCode 上安装了 Pylance,我的主题是 OneDarkPro。

我可以在 settings.json 中使用 editor.semanticTokenColorCustomizations 手动设置文本颜色,但我想知道是否有办法简单地保留我以前的文本颜色。

这是我的代码在安装 Pylance 之前的样子:

这是现在的样子:

这是由“Editor semantic highlighting”引起的。请将以下设置添加到设置文件“settings.json”以关闭语义突出显示:

"[python]": {
        "editor.semanticHighlighting.enabled": false,
    },

OneDarkPro 和 Pylance:

参考:Semantic highlighting colors every variable with same color.