Skip to content

Commit

Permalink
Read extension paths option
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Dec 6, 2023
1 parent 021df2d commit e59cfbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lsptoolshost/roslynLanguageServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand All @@ -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);
}
}

Expand Down

0 comments on commit e59cfbb

Please sign in to comment.