Skip to content

Commit 59f8126

Browse files
committed
feat(vscode): add support for typescript.sortImports, typescript.removeUnusedImports commands (#5444)
1 parent 757cb98 commit 59f8126

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

extensions/vscode/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,15 @@
430430
},
431431
{
432432
"command": "typescript.goToProjectConfig",
433-
"when": "editorLangId == vue"
433+
"when": "editorLangId == vue && typescript.isManagedFile"
434+
},
435+
{
436+
"command": "typescript.sortImports",
437+
"when": "supportedCodeAction =~ /(\\s|^)source\\.sortImports\\b/ && editorLangId =~ /^vue$/"
438+
},
439+
{
440+
"command": "typescript.removeUnusedImports",
441+
"when": "supportedCodeAction =~ /(\\s|^)source\\.removeUnusedImports\\b/ && editorLangId =~ /^vue$/"
434442
},
435443
{
436444
"command": "vue.action.splitEditors",

0 commit comments

Comments
 (0)