Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 如何从VSCode中的textmate范围中删除样式_Visual Studio Code_Syntax Highlighting - Fatal编程技术网

Visual studio code 如何从VSCode中的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范围覆盖 因此,为了应用我的自定义样式,我

如何删除主题在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",         "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)
  }
}