@@ -18,36 +18,28 @@ import * as vscode from 'vscode';
1818import { config } from './lib/config' ;
1919import { activate as activateWelcome } from './lib/welcome' ;
2020
21+ let client : lsp . BaseLanguageClient | undefined ;
2122let needRestart = false ;
2223
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 ) ;
24+ for (
25+ const incompatibleExtensionId of [
26+ 'johnsoncodehk .vscode-typescript-vue-plugin',
27+ 'Vue.vscode-typescript-vue-plugin' ,
28+ ]
29+ ) {
30+ const extension = vscode . extensions . getExtension ( incompatibleExtensionId ) ;
3031 if ( extension ) {
3132 vscode . window . showErrorMessage (
32- `The "${ extensionId } " extension is incompatible with the Vue extension. Please uninstall it.` ,
33+ `The "${ incompatibleExtensionId } " extension is incompatible with the Vue extension. Please uninstall it.` ,
3334 'Show Extension' ,
3435 ) . then ( action => {
3536 if ( action === 'Show Extension' ) {
36- vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + extensionId ) ;
37+ vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + incompatibleExtensionId ) ;
3738 }
3839 } ) ;
3940 }
4041}
4142
42- let client : lsp . BaseLanguageClient | undefined ;
43-
44- class _LanguageClient extends lsp . LanguageClient {
45- fillInitializeParams ( params : lsp . InitializeParams ) {
46- // fix https://github.com/vuejs/language-tools/issues/1959
47- params . locale = vscode . env . language ;
48- }
49- }
50-
5143export const { activate, deactivate } = defineExtension ( ( ) => {
5244 const context = extensionContext . value ! ;
5345 const volarLabs = createLabsInfo ( ) ;
@@ -125,7 +117,7 @@ export const { activate, deactivate } = defineExtension(() => {
125117
126118function launch ( context : vscode . ExtensionContext ) {
127119 const serverModule = vscode . Uri . joinPath ( context . extensionUri , 'dist' , 'language-server.js' ) ;
128- const client = new _LanguageClient (
120+ const client = new lsp . LanguageClient (
129121 'vue' ,
130122 'Vue' ,
131123 {
0 commit comments