@@ -18,36 +18,28 @@ 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 client : lsp . BaseLanguageClient | undefined ;
21
22
let needRestart = false ;
22
23
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 ) ;
30
31
if ( extension ) {
31
32
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.` ,
33
34
'Show Extension' ,
34
35
) . then ( action => {
35
36
if ( action === 'Show Extension' ) {
36
- vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + extensionId ) ;
37
+ vscode . commands . executeCommand ( 'workbench.extensions.search' , '@id:' + incompatibleExtensionId ) ;
37
38
}
38
39
} ) ;
39
40
}
40
41
}
41
42
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
-
51
43
export const { activate, deactivate } = defineExtension ( ( ) => {
52
44
const context = extensionContext . value ! ;
53
45
const volarLabs = createLabsInfo ( ) ;
@@ -125,7 +117,7 @@ export const { activate, deactivate } = defineExtension(() => {
125
117
126
118
function launch ( context : vscode . ExtensionContext ) {
127
119
const serverModule = vscode . Uri . joinPath ( context . extensionUri , 'dist' , 'language-server.js' ) ;
128
- const client = new _LanguageClient (
120
+ const client = new lsp . LanguageClient (
129
121
'vue' ,
130
122
'Vue' ,
131
123
{
0 commit comments