How do I stop VSCode from searching for references in my virtual environments?

Viewed 469

The "Find all references" search takes forever. enter image description here

When it finishes I see that VSCode searched for references in my virtual environments .venv and .venvlinux, even though I listed it under my "Files: Exclude" and "Files: Watcher Exclude" settings

enter image description here

enter image description here

My json.settings file looks like this

{
    "files.exclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true,
        "**/.venv": true,
        "**/.venvlinux": true
      },

      "files.watcherExclude": {
        "**/.git/objects/**": true,
        "**/.git/subtree-cache/**": true,
        "**/node_modules/*/**": true,
        "**/.hg/store/**": true,
        "**/.venv/**": true,
        "**/.venvlinux/**": true
      },
}

How do I stop VSCode from searching for references in my virtual environments?

3 Answers

I had this same issue. I had to add the pattern to my Search.exclude settings, instead of the Files.exclude settings.

Use another IDE. Then it shouldn't do that anymore. I know you're probably thinking I'm saying this just to be rude, but I'm just suggesting this in case nothing else works and you absolutely have to.

Related