John Mike
John Mike

Reputation: 2095

How to ignore directories from a workspace symbol search in vscode

When searching for a symbol in VSCode across a JS project, it seems to return results from the node_modules:

enter image description here How can I omit these?

I've tried adding node_module entries into files.exclude and search.exclude but that seems to have no effect

Upvotes: 7

Views: 2686

Answers (3)

kbysiec
kbysiec

Reputation: 618

I was suffering the same and decided to develop an extension for easy navigation among workspace files and symbols. Hope it helps somebody.

It is fully customizable so the user can easily decide which folders are included/excluded from the currently opened workspace/project.

https://marketplace.visualstudio.com/items?itemName=kbysiec.vscode-search-everywhere

Upvotes: 2

SystematicFrank
SystematicFrank

Reputation: 17261

That's not currently possible, but there is an open issue about it you can follow until solved.

Upvotes: 5

kemotoe
kemotoe

Reputation: 1777

Ignore folders in a certain workspace, you can go to:

AppMenu > Preferences > Workspace Settings

Ignore in all your workspaces, go to:

AppMenu > Preferences > User Settings

and add the following to your configuration:

 "search.excludeFolders": [
            "node_modules",
            ".git",
            ...
        ],

Upvotes: -3

Related Questions