@@ -48,9 +48,7 @@ class _LanguageClient extends lsp.LanguageClient {
48
48
}
49
49
}
50
50
51
- export const { activate, deactivate } = defineExtension ( async ( ) => {
52
- await vscode . extensions . getExtension ( 'vscode.typescript-language-features' ) ?. activate ( ) ;
53
-
51
+ export const { activate, deactivate } = defineExtension ( ( ) => {
54
52
const context = extensionContext . value ! ;
55
53
const volarLabs = createLabsInfo ( ) ;
56
54
const activeTextEditor = useActiveTextEditor ( ) ;
@@ -67,23 +65,18 @@ export const { activate, deactivate } = defineExtension(async () => {
67
65
nextTick ( ( ) => stop ( ) ) ;
68
66
69
67
if ( needRestart ) {
70
- if ( vscode . env . remoteName ) {
71
- vscode . window . showInformationMessage (
72
- 'Please restart the extension host to activate Vue support in remote environments.' ,
73
- 'Restart Extension Host' ,
74
- 'Reload Window' ,
75
- ) . then ( action => {
76
- if ( action === 'Restart Extension Host' ) {
77
- vscode . commands . executeCommand ( 'workbench.action.restartExtensionHost' ) ;
78
- }
79
- else if ( action === 'Reload Window' ) {
80
- vscode . commands . executeCommand ( 'workbench.action.reloadWindow' ) ;
81
- }
82
- } ) ;
83
- }
84
- else {
85
- vscode . commands . executeCommand ( 'workbench.action.restartExtensionHost' ) ;
86
- }
68
+ vscode . window . showInformationMessage (
69
+ 'Please restart the extension host to activate Vue support in remote environments.' ,
70
+ 'Restart Extension Host' ,
71
+ 'Reload Window' ,
72
+ ) . then ( action => {
73
+ if ( action === 'Restart Extension Host' ) {
74
+ vscode . commands . executeCommand ( 'workbench.action.restartExtensionHost' ) ;
75
+ }
76
+ else if ( action === 'Reload Window' ) {
77
+ vscode . commands . executeCommand ( 'workbench.action.reloadWindow' ) ;
78
+ }
79
+ } ) ;
87
80
return ;
88
81
}
89
82
@@ -245,7 +238,12 @@ try {
245
238
}
246
239
247
240
if ( tsExtension . isActive ) {
248
- needRestart = true ;
241
+ if ( ! vscode . env . remoteName ) {
242
+ vscode . commands . executeCommand ( 'workbench.action.restartExtensionHost' ) ;
243
+ }
244
+ else {
245
+ needRestart = true ;
246
+ }
249
247
}
250
248
}
251
249
catch { }
0 commit comments