Template String Converter 无法作用在 vue、html 解决方案

发布时间 2023-08-08 21:35:39作者: zhangxinloop

在 vscode 插件安装地址中找到该插件,默认位置:C:\Users\你的用户名\.vscode\extensions\meganrogge.template-string-converter-0.6.1

该目录下有一个 package.json 文件,打开该文件,编辑里面的 activationEvents 项,添加你想要作用的语言,例:

"activationEvents": [
    "onLanguage:html",
    "onLanguage:vue"
 ]

然后在同级选项中,有一个 contributes 项,里面添加你想要添加的语言就好了

"contributes": {
    "configuration": [
        {
            "properties": {
                "template-string-converter.validLanguages": {
                    "default": [
                  "vue",
                  "html"
                   ]
               }
             }
         }
     ]
}

我自己的 vscode 的 html 文件中可以这样使用,但是博客不好插入视频,我也是新手,多多体谅