diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index f278a476e0e..47e7c042f8f 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -1218,7 +1218,6 @@ export interface IFilesConfiguration { autoSaveDelay: number; eol: string; enableTrash: boolean; - excludeGitIgnore: boolean; hotExit: string; saveConflictResolution: 'askUser' | 'overwriteFileOnDisk'; }; diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index cd4f1fd7ee5..722400c1450 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -186,12 +186,6 @@ configurationRegistry.registerConfiguration({ 'markdownDescription': nls.localize('autoGuessEncoding', "When enabled, the editor will attempt to guess the character set encoding when opening files. This setting can also be configured per language. Note, this setting is not respected by text search. Only `#files.encoding#` is respected."), 'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE }, - 'files.excludeGitIgnore': { - type: 'boolean', - markdownDescription: nls.localize('excludeGitignore', "Controls whether entries in .gitignore should be parsed and excluded from the explorer. Similar to `#files.exclude#`."), - default: false, - scope: ConfigurationScope.RESOURCE - }, 'files.eol': { 'type': 'string', 'enum': [ @@ -477,6 +471,12 @@ configurationRegistry.registerConfiguration({ 'description': nls.localize('copyRelativePathSeparator', "The path separation character used when copying relative file paths."), 'default': 'auto' }, + 'explorer.excludeGitIgnore': { + type: 'boolean', + markdownDescription: nls.localize('excludeGitignore', "Controls whether entries in .gitignore should be parsed and excluded from the explorer. Similar to `#files.exclude#`."), + default: false, + scope: ConfigurationScope.RESOURCE + }, 'explorer.fileNesting.enabled': { 'type': 'boolean', scope: ConfigurationScope.RESOURCE, diff --git a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts index 241b06a7fae..4ee0a890174 100644 --- a/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/contrib/files/browser/views/explorerViewer.ts @@ -622,7 +622,7 @@ export class FilesFilter implements ITreeFilter { ) { this.toDispose.push(this.contextService.onDidChangeWorkspaceFolders(() => this.updateConfiguration())); this.toDispose.push(this.configurationService.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration('files.exclude') || e.affectsConfiguration('files.excludeGitIgnore')) { + if (e.affectsConfiguration('files.exclude') || e.affectsConfiguration('explorer.excludeGitIgnore')) { this.updateConfiguration(); } })); @@ -683,7 +683,7 @@ export class FilesFilter implements ITreeFilter { this.contextService.getWorkspace().folders.forEach(folder => { const configuration = this.configurationService.getValue({ resource: folder.uri }); const excludesConfig: glob.IExpression = configuration?.files?.exclude || Object.create(null); - const parseIgnoreFile: boolean = configuration.files.excludeGitIgnore; + const parseIgnoreFile: boolean = configuration.explorer.excludeGitIgnore; // If we should be parsing ignoreFiles for this workspace and don't have an ignore tree initialize one if (parseIgnoreFile && !this.ignoreTreesPerRoot.has(folder.uri.toString())) { diff --git a/src/vs/workbench/contrib/files/common/files.ts b/src/vs/workbench/contrib/files/common/files.ts index 5f10b350de4..d903a67b219 100644 --- a/src/vs/workbench/contrib/files/common/files.ts +++ b/src/vs/workbench/contrib/files/common/files.ts @@ -98,6 +98,7 @@ export interface IFilesConfiguration extends PlatformIFilesConfiguration, IWorkb badges: boolean; }; incrementalNaming: 'simple' | 'smart'; + excludeGitIgnore: boolean; fileNesting: { enabled: boolean; expand: boolean;