@@ -18,28 +18,8 @@ import * as vscode from 'vscode';
1818import { config } from './lib/config' ;
1919import { activate as activateWelcome } from './lib/welcome' ;
2020
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-
4221let client : lsp . BaseLanguageClient | undefined ;
22+ let needRestart = false ;
4323
4424class _LanguageClient extends lsp . LanguageClient {
4525 fillInitializeParams ( params : lsp . InitializeParams ) {
@@ -64,6 +44,25 @@ export const { activate, deactivate } = defineExtension(() => {
6444
6545 nextTick ( ( ) => stop ( ) ) ;
6646
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+
6766 if ( needRestart ) {
6867 vscode . window . showInformationMessage (
6968 'Please restart the extension host to activate Vue support in remote environments.' ,
0 commit comments