From e59cfbb3dd58eba76405a9dfecc3deccf8e9f294 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 6 Dec 2023 11:22:13 -0800 Subject: [PATCH] Read extension paths option --- src/lsptoolshost/roslynLanguageServer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lsptoolshost/roslynLanguageServer.ts b/src/lsptoolshost/roslynLanguageServer.ts index 176167149..f007b8093 100644 --- a/src/lsptoolshost/roslynLanguageServer.ts +++ b/src/lsptoolshost/roslynLanguageServer.ts @@ -902,7 +902,7 @@ export async function activateRoslynLanguageServer( return languageServer; function scanExtensionPlugins(): string[] { - return vscode.extensions.all.flatMap((extension) => { + const extensionsFromPackageJson = vscode.extensions.all.flatMap((extension) => { let loadPaths = extension.packageJSON.contributes?.['csharpExtensionLoadPaths']; if (loadPaths === undefined || loadPaths === null) { _traceChannel.appendLine(`Extension ${extension.id} does not contribute csharpExtensionLoadPaths`); @@ -920,6 +920,8 @@ export async function activateRoslynLanguageServer( _traceChannel.appendLine(`Extension ${extension.id} contributes csharpExtensionLoadPaths: ${loadPaths}`); return loadPaths; }); + const extensionsFromOptions = languageServerOptions.extensionsPaths ?? []; + return extensionsFromPackageJson.concat(extensionsFromOptions); } }