英文:
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。
将此添加到您的设置中:
"highlight.regexes": {
"(;|\\{|\\})": [
{ "color": "#ffffff" }
]
}
而不是#ffffff
,请选择一个与编辑器背景颜色相等或接近的颜色。
我已经创建了一个拉取请求(Pull Request),以使设置与主题相关,但尚未合并。
也许您需要更改设置highlight.maxMatches
以获取所有更改。
英文:
You can use the extension Highlight
Add this to your settings:
"highlight.regexes": {
"(;|\\{|\\})": [
{ "color": "#ffffff" }
]
}
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
> rules
和editor.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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论