diff --git a/package.json b/package.json index b87e539b9..9dab4f65a 100644 --- a/package.json +++ b/package.json @@ -1010,6 +1010,11 @@ "default": true, "description": "Specifies whether the OmniSharp server will be automatically started or not. If false, OmniSharp can be started with the 'Restart OmniSharp' command" }, + "omnisharp.projectFilesExcludePattern" :{ + "type": "string", + "default": "**/node_modules/**,**/.git/**,**/bower_components/**", + "description": "The exclude pattern used by OmniSharp to find all project files." + }, "omnisharp.projectLoadTimeout": { "type": "number", "default": 60, diff --git a/src/omnisharp/launcher.ts b/src/omnisharp/launcher.ts index f0ed2dcea..3a115f317 100644 --- a/src/omnisharp/launcher.ts +++ b/src/omnisharp/launcher.ts @@ -65,7 +65,7 @@ export async function findLaunchTargets(options: Options): Promise('autoStart', true); + const projectFilesExcludePattern = omnisharpConfig.get('projectFilesExcludePattern', '**/node_modules/**,**/.git/**,**/bower_components/**'); const projectLoadTimeout = omnisharpConfig.get('projectLoadTimeout', 60); const maxProjectResults = omnisharpConfig.get('maxProjectResults', 250); const defaultLaunchSolution = omnisharpConfig.get('defaultLaunchSolution', ''); @@ -154,6 +156,7 @@ export class Options { waitForDebugger, loggingLevel, autoStart, + projectFilesExcludePattern, projectLoadTimeout, maxProjectResults, useEditorFormattingSettings, diff --git a/test/unitTests/Fakes/FakeOptions.ts b/test/unitTests/Fakes/FakeOptions.ts index 2c3c1ba92..6ecf0b641 100644 --- a/test/unitTests/Fakes/FakeOptions.ts +++ b/test/unitTests/Fakes/FakeOptions.ts @@ -12,6 +12,7 @@ export function getEmptyOptions(): Options { /* waitForDebugger */false, /* loggingLevel */"", /* autoStart */false, + /* projectFilesExcludePattern */"", /* projectLoadTimeout */0, /* maxProjectResults */0, /* useEditorFormattingSettings */false,