在 vscode 中丢失了 python 语法高亮 [英] lost python syntax highlight in vscode

查看:213
本文介绍了在 vscode 中丢失了 python 语法高亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

vscode 中的语法高亮几乎丢失了.在此处输入图片描述

The syntax highlighting has almost been lost in vscode. enter image description here

我的 vscode 版本是:

My vscode version is:

Version: 1.40.1 (system setup)
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:49:35.976Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18362

我已经安装了 Python 扩展包 (1.6.0) 中的所有扩展.

I have installed all the extensions in the Python Extension Pack (1.6.0).

操作系统:Windows 10

Operating system: Windows 10

我应该怎么做才能恢复语法高亮?

What should I do to restore the syntax highlighting?

谢谢

推荐答案

需要检查的两件事.一,确保您选择了一个颜色主题,以突出显示您想要突出显示的内容.二、确保您的文件将其语言模式设置为Python".

Two things to check. One, make sure you have a colour theme chosen which highlights what you want highlighted. Two, make sure that your file has a its language mode set to "Python".

否则 VS Code 提供开箱即用的 Python 语法突出显示,无需任何扩展.

Otherwise VS Code provides Python syntax highlighting out of the box without any extensions.

这篇关于在 vscode 中丢失了 python 语法高亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆