visual-studio-code - 在 VSCode 主题中自定义块引用颜色
问题描述
我在 VScode 中使用Nord 主题。降价文件中的块引号看起来像这样,非常难以辨认。如何更改文字背景?
我在用户设置中尝试了以下操作,但它不起作用:
"workbench.colorCustomizations": {
"textBlockQuote.background": "#ff0000", // changes the markdown preview
"editor.textBlockQuote.background": "#0000ff", // Property not allowed
"[Nord]": {
"textBlockQuote.background": "#ff0000", // changes the markdown preview
},
},
"editor.tokenColorCustomizations": {
"textBlockQuote.background": "#ff0000", // Property not allowed
"editor.textBlockQuote.background": "#ff0000", // Property not allowed
"[Nord]": {
"textBlockQuote.background": "#ff0000", // Property not allowed
"editor.textBlockQuote.background": "#ff0000", // Property not allowed
}
},
解决方案
编辑器着色来自 textmate 语法。要覆盖它,您需要textMateRules
使用editor.tokenColorCustomizations
"editor.tokenColorCustomizations": {
"[Nord]": {
"textMateRules": [
{
"scope": "markup.quote.markdown",
"settings": {
"foreground": "#f0f"
}
}
]
}
}
这里使用的范围 ( markup.quote.markdown
) 是 markdown 块引号的 textmate 范围。您可以使用Developer: Inspect TM Scopes
VS Code 中的命令来确定目标范围
请注意,VS Code 不支持设置文本的背景颜色。这是跟踪here
推荐阅读
- python - 如何删除逗号,形成python程序
- java - FORTIFY:vsprintf:阻止 33 字节写入 32 字节缓冲区
- firebase - Flutter 项目,Firebase 登录不起作用并抛出未处理的异常:类型“FirebaseUser”不是“bool”类型的子类型错误
- wordpress - 如何在 Gatsby 中获取所有 Wordpress 帖子并显示标签
- python - 无法将保存的模型部署到 AWS Sagemaker
- c# - 如何使用计时器将淡入淡出过渡效果应用于 PictureBox 图像?
- c++ - 我的构造奇数幻方的代码不起作用
- javascript - 带有 socket.io 的 React-quill 编辑器创建无限循环
- r - 是否可以使用分类变量作为自变量来绘制逻辑回归?
- vue.js - 测试一个调用另一个 getter 的 getter,而不进行模拟 - 或者如何在测试中挂载 Vuex?