问题描述
如何删除主题在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 (将#修改为@)