Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames files.excludeGitIgnore -> explorer.excludeGitIgnore #150848

Merged
merged 1 commit into from May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/vs/platform/files/common/files.ts
Expand Up @@ -1218,7 +1218,6 @@ export interface IFilesConfiguration {
autoSaveDelay: number;
eol: string;
enableTrash: boolean;
excludeGitIgnore: boolean;
hotExit: string;
saveConflictResolution: 'askUser' | 'overwriteFileOnDisk';
};
Expand Down
12 changes: 6 additions & 6 deletions src/vs/workbench/contrib/files/browser/files.contribution.ts
Expand Up @@ -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': [
Expand Down Expand Up @@ -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,
Expand Down
Expand Up @@ -622,7 +622,7 @@ export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {
) {
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();
}
}));
Expand Down Expand Up @@ -683,7 +683,7 @@ export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {
this.contextService.getWorkspace().folders.forEach(folder => {
const configuration = this.configurationService.getValue<IFilesConfiguration>({ 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())) {
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/contrib/files/common/files.ts
Expand Up @@ -98,6 +98,7 @@ export interface IFilesConfiguration extends PlatformIFilesConfiguration, IWorkb
badges: boolean;
};
incrementalNaming: 'simple' | 'smart';
excludeGitIgnore: boolean;
fileNesting: {
enabled: boolean;
expand: boolean;
Expand Down