File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { loadConfigurationForExtension } from '@codingame/monaco-editor-wrapper/features/extensionConfigurations'
2
- import { getLanguageClientOptions , LanguageClientId } from './languageClientOptions'
2
+ import { LanguageClientOptions } from './languageClientOptions'
3
3
4
4
/**
5
5
* Load the configuration schemas from vscode extensions
6
6
* @param forLanguageClientIds Load the extensions related to these language client ids
7
7
* @param useMutualizedProxy The language server proxy is used, so we only need to load configurations for language servers which are not mutualized
8
8
*/
9
- export async function loadExtensionConfigurations ( forLanguageClientIds : LanguageClientId [ ] , useMutualizedProxy : boolean ) : Promise < void > {
9
+ export async function loadExtensionConfigurations ( clientOptions : LanguageClientOptions [ ] , useMutualizedProxy : boolean ) : Promise < void > {
10
10
const extensionConfigurationToLoad = new Set < string > ( )
11
- for ( const languageClientId of forLanguageClientIds ) {
12
- const config = getLanguageClientOptions ( languageClientId )
13
- if ( ! config . mutualizable || ! useMutualizedProxy ) {
14
- config . vscodeExtensionIds ?. forEach ( extensionId => {
11
+ for ( const clientOption of clientOptions ) {
12
+ if ( ! clientOption . mutualizable || ! useMutualizedProxy ) {
13
+ clientOption . vscodeExtensionIds ?. forEach ( extensionId => {
15
14
extensionConfigurationToLoad . add ( extensionId )
16
15
} )
17
16
}
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ export class LanguageClientManager implements LanguageClient {
171
171
172
172
private prepare = once ( async ( ) => {
173
173
try {
174
- await loadExtensionConfigurations ( [ this . id ] , this . useMutualizedProxy )
174
+ await loadExtensionConfigurations ( [ this . clientOptions ] , this . useMutualizedProxy )
175
175
} catch ( error ) {
176
176
errorHandler . onUnexpectedError ( new Error ( '[LSP] Unable to load extension configuration' , {
177
177
cause : error as Error
You can’t perform that action at this time.
0 commit comments