Skip to content

Commit b580b43

Browse files
fix(vscode): ask user to reload extension host when configuration changes (#5160)
Co-authored-by: KazariEX <[email protected]>
1 parent 083d460 commit b580b43

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: extensions/vscode/src/languageClient.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,21 @@ async function activateLc(
7373

7474
watch([enabledHybridMode, enabledTypeScriptPlugin], (newValues, oldValues) => {
7575
if (newValues[0] !== oldValues[0]) {
76-
requestReloadVscode(
77-
`Please reload VSCode to ${newValues[0] ? 'enable' : 'disable'} Hybrid Mode.`
76+
requestRestartExtensionHost(
77+
`Please restart extension host to ${newValues[0] ? 'enable' : 'disable'} Hybrid Mode.`
7878
);
7979
}
8080
else if (newValues[1] !== oldValues[1]) {
81-
requestReloadVscode(
82-
`Please reload VSCode to ${newValues[1] ? 'enable' : 'disable'} Vue TypeScript Plugin.`
81+
requestRestartExtensionHost(
82+
`Please restart extension host to ${newValues[1] ? 'enable' : 'disable'} Vue TypeScript Plugin.`
8383
);
8484
}
8585
});
8686

8787
watch(() => config.server.includeLanguages, () => {
8888
if (enabledHybridMode.value) {
89-
requestReloadVscode(
90-
'Please reload VSCode to apply the new language settings.'
89+
requestRestartExtensionHost(
90+
'Please restart extension host to apply the new language settings.'
9191
);
9292
}
9393
});
@@ -125,13 +125,13 @@ async function activateLc(
125125
useHybridModeStatusItem();
126126
useInsidersStatusItem(context);
127127

128-
async function requestReloadVscode(msg: string) {
128+
async function requestRestartExtensionHost(msg: string) {
129129
const reload = await vscode.window.showInformationMessage(
130130
msg,
131-
'Reload Window'
131+
'Restart Extension Host'
132132
);
133133
if (reload) {
134-
executeCommand('workbench.action.reloadWindow');
134+
executeCommand('workbench.action.restartExtensionHost');
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)