Scope VS Code search to a single git submodule in two clicks.
Working in a repository with many git submodules? Searching the whole workspace returns matches from every submodule at once. Submodule Search lets you pick a submodule and instantly scopes the built-in search to that folder by setting the files to include filter — so you only see results from the code you care about.
Features
🔍 One-click scoping — pick a submodule and the global search files to include filter is set for you.
📁 Submodule detection — reads paths from .gitmodules, falling back to git submodule status --recursive.
⚡ Searchable Quick Pick — type to filter when you have a long list of submodules.
🧭 Dedicated side panel — the Submodule Search activity-bar view with clickable include targets, recent filters, and quick actions.
📌 Status bar memory — your last selected filter is remembered and shown in the status bar.
🧹 Clear anytime — select All Files to reset the include filter and search the full workspace again.
Usage
Quick Pick
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
Run Submodule Search: Pick Folder Include Filter.
Type to filter, then pick a submodule path — it is applied to files to include in global search.
Select All Files at any time to clear the filter.
Side panel
Open the Submodule Search icon in the activity bar.
Use the top Search input to filter submodules.
Use the Active chip actions (Apply, Clear) for the current include.
Use Quick Actions (Refresh, Open Search, Show All).
Re-apply a recent filter from Recent, or click any entry under Folder Includes.
Commands
Command
Description
Submodule Search: Pick Folder Include Filter
Open the searchable submodule picker.
Submodule Search: Apply Current Include Filter
Re-apply the last selected filter.
Submodule Search: Refresh Side Panel
Re-scan submodules and refresh the side panel.
Requirements
VS Code ^1.109.0.
A workspace with git submodules declared in .gitmodules (or discoverable via git submodule status).
How it works
VS Code does not expose an API to inject a custom dropdown directly into the built-in Search view's filter row. Submodule Search instead provides a command, a searchable Quick Pick, and a side panel, then applies your selection to the Search panel state via workbench.action.findInFiles.