Visual Studio Code search not showing obvious files

662 views Asked by At

I'm running into issues with VS Code's file search. I've tried restarting the app, reopening the workspace, etc, but the problem persists.

Simply put, the file search can't find exact matches for basic files like my package.json or tsconfig.json in the root directory. See the screenshots below.

It shows my package-lock, but not package.json. It cant find these files even when matched explicitly. I have only the standard exclusions on, none of which should effect these files. What could be happening?

This is even more frustrating considering that the "go to file" command (cmd+p on Mac) shows every file across all my directories. So a search for "package" returns every package.json I have. VScode search is practically unusable right now.

Does anyone have any tips or solutions? Is this an open issue?

enter image description here

enter image description here

1

There are 1 answers

0
starball On

You're searching with the wrong part of the VS Code UI.

You're searching in the Search View (the one with the / icon), which searches for file contents.

To search for files by name, use the Explorer view (the one with the /) and press the find shortcut (ctrl+f on windows and linux, and cmd+f on MacOS) to open up the find widget. Or use the Quick Open feature. Or use any of the following commands in the command palette or their respective keyboard shortcuts: File: Open File..., File: Open Recent....