VS Code – 如何使括号和方括号变粗

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

VS Code - How to make brackets, parentheses, and square brackets bold

问题

我喜欢这个颜色主题,但我讨厌花括号、方括号和括号的颜色太淡。

花括号我设法加粗了。

"editor.tokenColorCustomizations":
{
	"textMateRules":
	[{
		"scope": ["punctuation"],
		"settings": {"fontStyle": "bold"}
	}]
},

有些改善,但括号和方括号仍然很淡。我正在尝试其他设置,但找不到哪些设置影响括号和方括号。

欢迎任何帮助。

英文:

VS Code – 如何使括号和方括号变粗

I love this color theme but I hate how much the curly brackets, square brackets, and parentheses are washed out.

The curly brackets I managed to leave bold.

	"editor.tokenColorCustomizations":
	{
		"textMateRules":
		[{
			"scope": ["punctuation"],
			"settings": {"fontStyle": "bold"}
		}]
	},

It improved a little, but the parentheses and square brackets are still very faint. I'm testing other settings, but I can't find which ones affect the parentheses and square brackets.

Any help is welcome.

</details>


# 答案1
**得分**: 1

我找到了解决方案!我打开了命令面板 `Ctrl+Shift+P`,运行了 **Developer: Inspect Editor Tokens and Scopes** 功能,然后点击显示了处理自定义该字符的范围的字符。

在发现范围之后,我只需编辑 `settings.json` 中的相应设置:

```json
"editor.tokenColorCustomizations":
{
	"textMateRules":
	[{
		"scope": ["punctuation"],
		"settings": {"fontStyle": "bold"}
	}]
},
英文:

I found the solution! I opened the Command Palette Ctrl+Shift+P and ran the Developer: Inspect Editor Tokens and Scopes function, and clicked on the characters that showed me the scope that takes care of customizing that character.

After discovering the scope, I simply edited the respective settings in settings.json:

&quot;editor.tokenColorCustomizations&quot;:
{
	&quot;textMateRules&quot;:
	[{
		&quot;scope&quot;: [&quot;punctuation&quot;],
		&quot;settings&quot;: {&quot;fontStyle&quot;: &quot;bold&quot;}
	}]
},

huangapple
  • 本文由 发表于 2023年5月28日 11:44:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76349847.html
匿名

发表评论

匿名网友

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

确定