File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ class MainProvider implements vscode.FoldingRangeProvider {
49
49
const config = vscode . workspace . getConfiguration ( CONFIG_KEY , document ) ;
50
50
const additionalSchemes = config . get < string [ ] > ( 'additionalSchemes' ) ?? [ ] ;
51
51
52
- const provider = buildProvider ( language , config ) ;
52
+ const mainProvider = buildProvider ( language , config ) ;
53
+
54
+ const perFiles = config . get < Record < string , ExplicitFoldingConfig [ ] | ExplicitFoldingConfig | undefined > | undefined > ( 'perFiles' ) ;
55
+ const provider = perFiles ? buildRouter ( perFiles , mainProvider , config ) : mainProvider ;
53
56
54
57
for ( const scheme of [ ...SCHEMES , ...additionalSchemes ] ) {
55
58
const disposable = vscode . languages . registerFoldingRangeProvider ( { language, scheme } , provider ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class RouteProvider implements FoldingRangeProvider {
52
52
}
53
53
}
54
54
55
- this . debugChannel ?. appendLine ( `[document] fileName: ${ basename ( document . fileName ) } , route: main ` ) ;
55
+ this . debugChannel ?. appendLine ( `[document] fileName: ${ basename ( document . fileName ) } , route: fallback ` ) ;
56
56
57
57
return this . mainProvider . provideFoldingRanges ( document ) ;
58
58
} // }}}
You can’t perform that action at this time.
0 commit comments