Skip to content

Commit 507377c

Browse files
committed
feat(vscode): enhance custom Vue server path handling with user feedback
1 parent 9066601 commit 507377c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

extensions/vscode/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,19 @@ export = defineExtension(() => {
100100
);
101101
}
102102

103-
if (config.server.path && !serverPath) {
104-
vscode.window.showErrorMessage('Cannot find @vue/language-server.');
105-
return;
103+
if (config.server.path) {
104+
if (!serverPath) {
105+
vscode.window.showErrorMessage('Cannot find @vue/language-server.');
106+
return;
107+
}
108+
vscode.window.showInformationMessage(
109+
`You are using a custom Vue server: ${config.server.path}. If the server fails to start, please check the path in settings.`,
110+
'Open Settings',
111+
).then(action => {
112+
if (action === 'Open Settings') {
113+
vscode.commands.executeCommand('workbench.action.openSettings', 'vue.server.path');
114+
}
115+
});
106116
}
107117

108118
client = launch(serverPath ?? vscode.Uri.joinPath(context.extensionUri, 'dist', 'language-server.js').fsPath);

0 commit comments

Comments
 (0)