VSCode - source.organizeImports 在 .vue 文件中不起作用

VSCode - source.organizeImports is not working in .vue files

我正在尝试让我的编辑删除未使用的导入

"editor.formatOnPaste": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.organizeImports": true,
    "source.fixAll": true
  },

这在我的主入口点(.js 文件)上工作正常,但在任何带有 .vue 扩展名的东西上都不起作用。

有人成功了吗?

Vue 扩展 Vetur 目前不支持组织导入 (tracked here)

组织导入功能必须通过扩展按语言实现。如果您有兴趣获得 Vue 的支持,请考虑通过 PR 帮助 Vetur