Skip to content

adjust default file excludes (not accepted upstream patch) #3066

Open

Description

@GitMensch

There was a change suggestion years ago...

diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts
index 9f053b890de1f2..fb97df96323376 100644
--- a/src/vs/workbench/contrib/files/browser/files.contribution.ts
+++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts
@@ -154,7 +154,7 @@ configurationRegistry.registerConfiguration({
 			'type': 'object',
 			'markdownDescription': nls.localize('exclude', "Configure [glob patterns](https://aka.ms/vscode-glob-patterns) for excluding files and folders. For example, the File Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search-specific excludes. Refer to the `#explorer.excludeGitIgnore#` setting for ignoring files based on your `.gitignore`."),
 			'default': {
-				...{ '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true, '**/Thumbs.db': true },
+				...{ '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true, '**/Thumbs.db': true, '**/**~': true },
 				...(isWeb ? { '**/*.crswap': true /* filter out swap files used for local file access */ } : undefined)
 			},
 			'scope': ConfigurationScope.RESOURCE,

but that did not get enough community votes so was closed.

The main question here:
Would it be reasonable to patch that in vscodium, or should we stay with upstream decisions in this area?

There was also a related issue with the following notes:

files.exclude allows users to define which things should be not in file explorer, should not be searched and not indexed.
They can still be opened using "file open".

Reasonably the default https://github.com/microsoft/vscode/blob/4c31caa886a6f66fa3cff5f2654e4fa7fdad8f9c/src/vs/workbench/contrib/files/browser/files.contribution.ts#L155-L159 includes commonly used VCS' subfolders like .git, .svn, ...

The last commit there 1d9dc8b "web - filter out *.crswap via files.exclude" sneaked in the windows-only Thumbs.db (which I find a reasonable addition in any case), the previous fa0bc23 added CVS, with previous .hg and .svn additions.

I suggest to add more files there and while I initially had a bunch of files in my mind, including the list from the end, I've stepped down and suggest to at least add files ending with a~ because those are, over several systems and software, always temporary files #228981.

I'd like the community to:

  • vote for general addition of more entries, staring with **/**~
  • discuss which entries should be added, possibly including (this list is from a portable C build)
*.la
*.lo
*.o
*.so
*.obj
*.dll
*.lib
*.exe

*cache*
*-coverage
*.bak
*.gcda
*.gcno
*.diff
*.patch
*.tmp
cscope.*
TAGS

ipch
.vs
*.aps
*.ncb
*.*sdf
*.suo

.libs
.deps

Users can override that (which then means to also include the default values wanted) in their settings (so workspace/user/machine scope), so files that are "only very seldom should be used in the UI" can still be included (for example if someone wants his Thumbs.db or TAGS files shown), but we should still consider the likelyness (.deps seems to also be "something .NET/C#, not sure if this is like .vscode which you want to have included by default, for example).

Entries like *cache* are likely bad, thinking of for example package names including it. But who should have .bak or .tmp files shown and searched...

Activity

  1. daiyam commented on Oct 13, 2026

    @daiyam
    Member

    I'm more of see all files guy so I'm not favorable to hide additional files.
    And since, the files.exclude property works both way so those who want to hide more stuffs can still use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions