Skip to content

Commit

Permalink
Better explain file nesting config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Feb 10, 2022
1 parent 1aa9684 commit 82a8bec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/files/browser/files.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ configurationRegistry.registerConfiguration({
},
'explorer.experimental.fileNesting.patterns': {
'type': 'object',
'markdownDescription': nls.localize('fileNestingPatterns', "Experimental. Controls nesting of files in the explorer. `#explorer.experimental.fileNesting.enabled#` must be set for this to take effect. Each key describes a parent file pattern and each value should be a comma separated list of children file patterns that will be nested under the parent.\n\nA single `*` in a parent pattern may be used to capture any substring, which can then be matched against using `$\u200b(capture)` in a child pattern. Child patterns may also contain one `*` to match any substring."),
'markdownDescription': nls.localize('fileNestingPatterns', "Experimental. Controls nesting of files in the explorer. `#explorer.experimental.fileNesting.enabled#` must be set for this to take effect. Each key describes a parent file pattern and each value should be a comma separated list of children file patterns that will be nested under the parent.\n\nA single `*` in a parent pattern may be used to capture any substring, which can then be matched against using `$\u200b(capture)` in a child pattern. Child patterns may also contain one `*` to match any substring.\n\nFor example, given the configuration `*.ts => $(capture).js, $(capture).*.ts`, and a directory containing `a.ts, a.js, a.d.ts`, and `b.js`, nesting would apply as follows: \n- `*.ts` matches `a.ts`, capturing `a`. This causes any sibilings matching `a.js` or `a.*.ts` to be nested under `a.ts`\n - `a.js` matches `a.js` exactly, so is nested under `a.ts`\n - `a.d.ts` matches `a.*.ts`, so is also nested under `a.ts`\n\nThe final directory will be rendered with `a.ts` containg `a.js` and `a.d.ts` as nested children, and `b.js` as normal file."),
patternProperties: {
'^[^*]*\\*?[^*]*$': {
markdownDescription: nls.localize('fileNesting.description', "Key patterns may contain a single `*` capture group which matches any string. Each value pattern may contain one `$\u200b(capture)` token to be substituted with the parent capture group and one `*` token to match any string"),
Expand All @@ -480,7 +480,7 @@ configurationRegistry.registerConfiguration({
},
additionalProperties: false,
'default': {
'*.ts': '$(capture).js, $(capture).d.ts',
'*.ts': '$(capture).js, $(capture).*.ts',
'*.js': '$(capture).js.map, $(capture).min.js, $(capture).d.ts',
'*.jsx': '$(capture).js',
'*.tsx': '$(capture).ts',
Expand Down

0 comments on commit 82a8bec

Please sign in to comment.