为文件类型 (.pug) 添加自定义 VS 代码设置

Adding a custom VS Code setting for a file type (.pug)

如何设置 VS 代码设置仅激活特定文件扩展名?

在我的例子中是 "editor.renderWhitespace": "boundary" 所有 .pug.jade 文件。

谢谢!

将您的设置放在具有关键字 [jade] (Source) 的对象中:

{
    "[jade]": {
        "editor.renderWhitespace": "boundary",
    }
}

以上将同时支持jadepug文件,你不需要为两者都定义它。