vscode JavaScript语法突出显示

发布于 2025-02-04 18:16:42 字数 468 浏览 3 评论 0原文

漫长的休息后,我最近返回使用VSCODE。似乎在更新后,语法突出显示颜色已更改为:

“

从此:

< img src =“ https://i.sstatic.net/ionls.png” alt =“ the”>

是否有人知道如何在第二张图像中实现外观?我真的无法忍受不一致的支撑着色。如果这不是更新的变化,而我做错了什么,请告诉我

I've recently returned to using VSCode after a long break. It seems that after updating, the syntax highlighting colours have changed to this:

after

From this:

before

Does anybody know how to achieve the look in the second image? I really can't stand the inconsistent brace colouring. If this isn't a change made in updates and I'm doing something wrong, please let me know

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

海螺姑娘 2025-02-11 18:16:42

看来您要禁用支架对着色。

这是VSCODE团队的博客文章,谈论了最近介绍的这一新的突出显示功能: https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-coloration

为此,将以下设置设置为false:

"editor.bracketPairColorization.enabled": false,
"editor.guides.bracketPairs": false,

It appears you want to disable the bracket pairs colorization.

Here's a blog post from the VSCode team, talking about this new highlighting feature introduced recently : https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-colorization

To do so, set the following settings to false :

"editor.bracketPairColorization.enabled": false,
"editor.guides.bracketPairs": false,
不即不离 2025-02-11 18:16:42

我最近遇到了这个问题,我认为问题是由基于其检测到的语言使用的语言模式引起的。

我正在使用自动检测,我意识到我应该使用编辑器右下角的按钮明确地将语言设置为JavaScript。

将保留支架对着色,但是语法突出显示将变为您的期望。

最后,JavaScript接缝是最好的,但是自动检测可能会在语言模式不同的情况下选择打字稿或JSX。

注意:我认为原语,对象和保留的单词是独特的。一旦意识到它,这将是有帮助的。

我希望这对别人有帮助。

有用的图像:

javascript

自动检测

I ran into this issue recently and I think the problem is caused by the Language Mode that VS Code used based on the language it detects.

I was using Auto Detect and I realized I should have been explicitly setting the language to Javascript using the button in the bottom right corner of the editor.

Bracket pair colorization will be preserved, but the syntax highlighting will change to what you expect.

Finally, Javascript seams to be the best, but Auto Detect may select Typescript or JSX where the Language mode is different.

Note: I think primitives, objects, and reserved words are hightlighted uniquely. It's helpful once you realize it.

I hope this helps someone else.

Helpful Images:

Javascript

Auto Detect

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文