@@ -29,7 +29,10 @@ export class Options {
2929 public razorPluginPath ?: string ,
3030 public defaultLaunchSolution ?: string ,
3131 public monoPath ?: string ,
32- public maxProjectFileCountForDiagnosticAnalysis ?: number | null ) { }
32+ public excludePaths ?: string [ ] ,
33+ public maxProjectFileCountForDiagnosticAnalysis ?: number | null )
34+ {
35+ }
3336
3437 public static Read ( vscode : vscode ) : Options {
3538 // Extra effort is taken below to ensure that legacy versions of options
@@ -84,6 +87,22 @@ export class Options {
8487
8588 const maxProjectFileCountForDiagnosticAnalysis = csharpConfig . get < number | null > ( 'maxProjectFileCountForDiagnosticAnalysis' , 1000 ) ;
8689
90+ let workspaceConfig = vscode . workspace . getConfiguration ( ) ;
91+ let excludePaths = [ ] ;
92+ if ( workspaceConfig )
93+ {
94+ let excludeFilesOption = workspaceConfig . get < { [ i : string ] : boolean } > ( 'files.exclude' ) ;
95+ if ( excludeFilesOption )
96+ {
97+ for ( let field in excludeFilesOption ) {
98+ if ( excludeFilesOption [ field ] ) {
99+ excludePaths . push ( field ) ;
100+ }
101+ }
102+ }
103+ }
104+
105+
87106 return new Options (
88107 path ,
89108 useGlobalMono ,
@@ -107,7 +126,8 @@ export class Options {
107126 razorPluginPath ,
108127 defaultLaunchSolution ,
109128 monoPath ,
110- maxProjectFileCountForDiagnosticAnalysis ,
129+ excludePaths ,
130+ maxProjectFileCountForDiagnosticAnalysis
111131 ) ;
112132 }
113133
0 commit comments