Skip to content

Commit 4416f38

Browse files
committed
fix: Do not send configuration/initializationOptions to mutualized servers
1 parent 1986c6f commit 4416f38

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/languageClient.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,21 @@ function createLanguageClientManager (
276276
if (languageClientManagerByLanguageId[id] != null) {
277277
throw new Error(`Language client for language ${id} already started`)
278278
}
279-
const languageServerOptions = staticOptions[id]
279+
let languageServerOptions = staticOptions[id]
280280
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
281281
if (languageServerOptions == null) {
282282
throw new Error(`Unknown ${id} language server`)
283283
}
284+
285+
if (useMutualizedProxy && languageServerOptions.mutualizable) {
286+
// When using the mutualized proxy, we don't need to synchronize the configuration nor send the initialization options
287+
languageServerOptions = {
288+
...languageServerOptions,
289+
synchronize: undefined,
290+
initializationOptions: undefined
291+
}
292+
}
293+
284294
installServices()
285295

286296
const languageClientManager = new LanguageClientManager(id, sessionId, languageServerAddress, getSecurityToken, languageServerOptions, libraryUrls, useMutualizedProxy)

0 commit comments

Comments
 (0)