如何解决如何从VSCode中的textmate范围中删除样式
如何删除主题在textmate范围上设置的样式?我正在使用的主题在storage.type.function
范围内设置了字体粗细,我想将其删除,以使其继承自父范围。
两个关键字的最具体范围为storage.type.function
,根据主题将其设置为粗体。
我使用了两个不太具体的范围meta.function
和meta.function.closure
来设置常规和粗体样式,但是这两个主题都被主题设置的更具体的storage.type.function
范围所覆盖。
因此,要应用我的自定义样式,我需要以某种方式删除在storage.type.function
上设置的样式,以使其退回到我设置的meta
值。将其设置为空白不起作用:
{
"workbench.colorTheme": "Solarized Dark","editor.tokenColorCustomizations": {
"textMateRules": [
// Want to unset this style
{ "scope": "storage.type.function","settings": { "fontStyle": "" } },// Neither of these apply because the one above overrides them
{ "scope": "meta.function",{ "scope": "meta.function.closure","settings": { "fontStyle": "bold" } },]
}
如何取消设置storage.type.function
以便应用meta
样式?
这里有一些测试PHP可以重现问题,将其另存为example.php
并在VSCode中打开它:
<?php
class Test {
function a() { // "function" should not be bold (meta.function)
$b = function () {}; // "function" should be bold (meta.function.closure)
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。