繁体   English   中英

如何让我的 VSCode 扩展的配置默认值适用于任何文件类型而不是每种语言?

[英]How do I get my VSCode Extension's configurationDefaults to work on any file type and not on a per-language basis?

我正在尝试在 package.json 中添加一个适用于所有文件类型/语言的contributes.defaultConfiguration。 到目前为止,我在Visual Studio Code Documentation for Contribution Points上可以找到的所有内容都是基于每种语言的,可以在下面看到该站点的示例:

"contributes": {
    "configurationDefaults": {
        "[markdown]": {
            "editor.wordWrap": "on",
            "editor.quickSuggestions": false
        }
    }
}

从VS Code 1.24开始不支持此功能。

如果确实需要,扩展程序可以通过编程方式设置这些默认设置

您可以从 v1.63 开始执行此操作:

"contributes": {
    "configurationDefaults": {
            "editor.wordWrap": "on",
            "editor.quickSuggestions": false
        }
    }
}

请注意,不需要特定于语言的分组。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM