如何在VS Code中为所有语言调暗分号和花括号?

huangapple go评论73阅读模式
英文:

How can I dim semicolons and curly braces in VS Code for all languages?

问题

Is there any way to dim/hide semicolons and curly braces in VS Code? (I want to do this for all languages).

英文:

Is there any way to dim/hide semicolons and curly braces in VS Code? (I want to do this for all languages).

<img src="https://i.stack.imgur.com/4ZRrM.png" height="100">

答案1

得分: 1

以下是翻译好的部分:

您可以使用扩展程序Highlight

将此添加到您的设置中:

&quot;highlight.regexes&quot;: {
  &quot;(;|\\{|\\})&quot;: [
    { &quot;color&quot;: &quot;#ffffff&quot; }
  ]
}

而不是#ffffff,请选择一个与编辑器背景颜色相等或接近的颜色。

我已经创建了一个拉取请求(Pull Request),以使设置与主题相关,但尚未合并。

也许您需要更改设置highlight.maxMatches以获取所有更改。

英文:

You can use the extension Highlight

Add this to your settings:

&quot;highlight.regexes&quot;: {
  &quot;(;|\\{|\\})&quot;: [
    { &quot;color&quot;: &quot;#ffffff&quot; }
  ]
}

Instead of #ffffff choose a color that is equal or close to the editor background color.

I had created a Pull Request to make the settings Theme specific but it is not merged.

Maybe you have to change the setting highlight.maxMatches to get all changed.

答案2

得分: 0

我可能错了,但我不认为这样的东西存在(至少在此写作时)。

我查看了editor.semanticTokenColorCustomizations > ruleseditor.tokenColorCustomizations中的通用自定义点,但没有特别针对大括号、分号或标点符号的内容。

我认为您将不得不按照每种语言的方式来处理这个问题,通常的方法是使用Developer: Inspect Editor Tokens and Scopes命令,获取作用域并为每个作用域编写颜色自定义。

英文:

I could be wrong, but I don't think such a thing exists (at least at the time of this writing).

I looked through the generic customization points in editor.semanticTokenColorCustomizations > rules and in editor.tokenColorCustomizations and didn't see anything in particular for braces, semicolons, or punctuation.

I think you'll have to do this on a per-language basis, which is the usual route of using the Developer: Inspect Editor Tokens and Scopes command and getting scopes and writing colour customizations for each one.

huangapple
  • 本文由 发表于 2023年6月26日 14:36:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76554077.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定