Contribute language association from extensions in VSCode

本小妞迷上赌 提交于 2019-12-02 05:00:34

Yes, extensions can contribute settings via configurationDefaults. However, I don't think this works for the files.associations setting.

What you can do instead is contribute a new file extension for the markdown language:

"contributes": {
    "languages": [
        {
            "id": "markdown",
            "extensions": [
                "something"
            ]
        }
    ]
}

This won't replace the previous registration of the markdown language, instead it will be merged with it.

Make the following change to your package.json, I figured it out by studying an existing extension.

You must add . before something

Also see : How can I write a vsc snippets extension for a language that is not listed on visual studio code

"contributes": {
    "languages": [
      {
        "id": "markdown",
        "extensions": [
          ".something"
        ],
      }
    ]
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!