Visual studio code 如何从VSCode中的textmate范围中删除样式
如何删除主题在textmate范围上设置的样式?我使用的主题在Visual studio code 如何从VSCode中的textmate范围中删除样式,visual-studio-code,syntax-highlighting,Visual Studio Code,Syntax Highlighting,如何删除主题在textmate范围上设置的样式?我使用的主题在storage.type.function作用域上设置字体权重,我希望将其删除,以便它从父作用域继承 这两个关键字都有最具体的作用域,如storage.type.function,主题将其设置为粗体 我使用了两个不太具体的范围meta.function和meta.function.closure来设置常规和粗体样式,但是这两个范围都被主题设置的更具体的storage.type.function范围覆盖 因此,为了应用我的自定义样式,我
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", "settings": { "fontStyle": "" } },
{ "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)
}
}