@@ -18,28 +18,8 @@ import * as vscode from 'vscode';
18
18
import { config } from './lib/config' ;
19
19
import { activate as activateWelcome } from './lib/welcome' ;
20
20
21
- let needRestart = false ;
22
-
23
- const incompatibleExtensionIds = [
24
- 'johnsoncodehk.vscode-typescript-vue-plugin' ,
25
- 'Vue.vscode-typescript-vue-plugin' ,
26
- ] ;
27
-
28
- for ( const extensionId of incompatibleExtensionIds ) {
29
- const extension = vscode . extensions . getExtension ( extensionId ) ;
30
- if ( extension ) {
31
- vscode . window . showErrorMessage (
32
- `The "${ extensionId } " extension is incompatible with the Vue extension. Please uninstall it.` ,
33
- 'Show Extension' ,
34
- ) . then ( action => {
35
- if ( action === 'Show Extension' ) {
36
- vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + extensionId ) ;
37
- }
38
- } ) ;
39
- }
40
- }
41
-
42
21
let client : lsp . BaseLanguageClient | undefined ;
22
+ let needRestart = false ;
43
23
44
24
class _LanguageClient extends lsp . LanguageClient {
45
25
fillInitializeParams ( params : lsp . InitializeParams ) {
@@ -64,6 +44,25 @@ export const { activate, deactivate } = defineExtension(() => {
64
44
65
45
nextTick ( ( ) => stop ( ) ) ;
66
46
47
+ for (
48
+ const extensionId of [
49
+ 'johnsoncodehk.vscode-typescript-vue-plugin' ,
50
+ 'Vue.vscode-typescript-vue-plugin' ,
51
+ ]
52
+ ) {
53
+ const extension = vscode . extensions . getExtension ( extensionId ) ;
54
+ if ( extension ) {
55
+ vscode . window . showErrorMessage (
56
+ `The "${ extensionId } " extension is incompatible with the Vue extension. Please uninstall it.` ,
57
+ 'Show Extension' ,
58
+ ) . then ( action => {
59
+ if ( action === 'Show Extension' ) {
60
+ vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + extensionId ) ;
61
+ }
62
+ } ) ;
63
+ }
64
+ }
65
+
67
66
if ( needRestart ) {
68
67
vscode . window . showInformationMessage (
69
68
'Please restart the extension host to activate Vue support in remote environments.' ,
0 commit comments