File tree Expand file tree Collapse file tree 1 file changed +16
-17
lines changed Expand file tree Collapse file tree 1 file changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -64,25 +64,24 @@ function gitignoreGlobs(root: string): string[] {
64
64
}
65
65
66
66
function configIgnoredGlobs ( root : string ) : string [ ] {
67
- const configFilesExclude = Object . assign (
68
- [ ] ,
69
- vscode . workspace . getConfiguration ( 'advancedNewFile' ) . get ( 'exclude' )
67
+ const configFilesExcluded : {
68
+ [ key : string ] : boolean ;
69
+ } = Object . assign (
70
+ { } ,
71
+ vscode . workspace . getConfiguration ( 'advancedNewFile' ) . get ( 'exclude' ) ,
72
+ (
73
+ vscode . workspace
74
+ . getConfiguration ( 'advancedNewFile' )
75
+ . get ( 'useFilesExclude' , true )
76
+ ) ?
77
+ vscode . workspace
78
+ . getConfiguration ( 'files' , vscode . Uri . file ( root ) )
79
+ . get ( 'exclude' , { } )
80
+ : { }
70
81
) ;
71
- if (
72
- vscode . workspace
73
- . getConfiguration ( 'advancedNewFile' )
74
- . get ( 'useFilesExclude' , true )
75
- ) {
76
- configFilesExclude . push (
77
- ...vscode . workspace
78
- . getConfiguration ( 'files' )
79
- . get ( 'exclude' , [ vscode . Uri . file ( root ) ] )
80
- ) ;
81
- }
82
- const configIgnored = Object . keys ( configFilesExclude ) . filter (
83
- ( key ) => configFilesExclude [ key ] === true
82
+ const configIgnored = Object . keys ( configFilesExcluded ) . filter (
83
+ ( key ) => configFilesExcluded [ key ] === true
84
84
) ;
85
-
86
85
return gitignoreToGlob ( configIgnored . join ( '\n' ) , { string : true } ) ;
87
86
}
88
87
You can’t perform that action at this time.
0 commit comments