是否有方法在脚本设置中使Volar扩展来格式化代码?我没有使用Vetur,因为它与vue 3和它的新语法不兼容。
发布于 2022-06-24 04:33:49
按照链接中所示的nuxt3正式文档添加volar扩展。(https://vuejs.org/guide/typescript/overview.html)
并将下面的代码添加到项目顶部的..vscode/seting.json。
"[vue]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "Vue.volar"
},如果没有立即应用,请按命令+ shift +p键运行命令窗口,然后运行> Developer: Reload窗口命令.
https://stackoverflow.com/questions/70327427
复制相似问题