// settings.json
// Place your settings in this file to overwrite the default settings
{
"some_setting": custom_value,
...
"files.associations": {
"*.thor": "ruby",
"*.jsx": "javascript",
"Jenkinsfile*": "groovy"
}
}
要找到正确的语言ID,请使用Ctrl+转变+P(或视图 ->命令面板从菜单),然后键入Change Language Mode。你可以在列表中看到语言ID,例如输入docker来查找Docker文件的语言ID (dockerfile)。在上面示例的第一个条目中,.thor是文件结尾,ruby是语言ID。
Files: Associations特性在Visual Studio Code 1.0版(2016年3月)中首次引入。检查发布说明中可用的通配符模式和文档中的已知语言字符串。