File scope management, recursive folder expand, and automatic symbol rename on file rename — power tools for the VS Code Explorer
I work on a large monorepo with hundreds of folders and thousands of files. Every day I’d find myself collapsing and expanding the same subtrees, losing track of which files belong to the feature I’m working on, and manually renaming classes after renaming files. Small frictions, but they add up to real time lost.
VS Code’s built-in Explorer is surprisingly barebones for a tool developers live in all day. There’s no way to bookmark a subset of files, no recursive expand button, and renaming a file doesn’t touch the symbols inside it. I looked at what’s out there — extensions like File Nesting Updater or Explorer Exclude solve narrow problems but don’t address the broader workflow. Nothing gave me a way to say “these 12 files are my current scope” and just hide everything else. Inspired by IntelliJ’s Scopes Manager.
So I built File Explorer Tools — a small, focused set of power-ups for the Explorer panel that I actually needed every day:
.gitignoreuser-service.ts to account-service.ts, the class inside should follow — and so should every import across the projectfiles.exclude, so everything — search, quick open, git — stays consistent..vscode/scopes.json so your team can commit and share them. Personal scopes stay local.Assign files and folders to named scopes directly from the Explorer context menu. When a scope is selected, the native File Explorer filters down to show only the files that belong to it — powered by files.exclude under the hood.
| Name | Description |
|---|---|
Scopes Manager: Create Scope |
Create a new named scope |
Scopes Manager: Add to Scope |
Add selected files/folders to a scope |
Scopes Manager: Remove from Scope |
Remove selected files/folders from a scope |
Scopes Manager: Delete Scope |
Delete an existing scope |
Scopes Manager: Rename Scope |
Rename an existing scope |
Scopes Manager: Clear Scope Patterns |
Remove all patterns from a scope |
Scopes Manager: Switch Scope |
Pick the active scope from a quick list |
Scopes Manager: Install scopes MCP |
Configure MCP server in the workspace |
Keybindings are active when the File Explorer or an Editor is focused.
| Name | Description | Keybinding |
|---|---|---|
Scopes Manager: Add to Scope |
Add selected files/folders to a scope | Alt+S |
Scopes Manager: Remove from Scope |
Remove selected files from a scope | Alt+D |
Scopes Manager: Switch Scope |
Pick the active scope from a quick list | Shift+Alt+S |
| Name | Description | Default |
|---|---|---|
scopesManager.localScopes |
Locally stored scopes (not committed to VCS). Managed automatically by the extension. | [] |
Shared scopes are stored in
.vscode/scopes.jsonand can be committed to version control.
Scope filtering uses the native VS Code files.exclude workspace setting. When you select a scope, the extension computes which files and folders are not part of the scope and temporarily adds them to files.exclude. Deselecting the scope restores the original exclude list. This means filtering works with the built-in File Explorer — no custom tree views needed.
Tip: Searching while a scope is active Because scopes use
files.exclude, VS Code search and Quick Open (Ctrl+P) will also be filtered. To search everywhere without deactivating your scope, toggle the “Use Exclude Settings and Ignore Files” (gear icon) in the Search view.
The extension includes a Model Context Protocol (MCP) server that allows LLMs to interact with your defined scopes.
list_scopes: List all available scope names in the current workspace.get_scope_patterns: Get the glob patterns for a specific scope.To install the MCP server automatically, run the Scopes Manager: Install scopes MCP command from the Command Palette (Ctrl+Shift+P). This will create or update a .mcp.json or .gemini/settings.json file in your workspace root.
For manual configuration (e.g., in Claude Desktop), use:
nodepath/to/extension/tools/mcp-scopes/server.jsOne-click recursive expansion of all folders in the File Explorer. Appears as an icon in the Explorer title bar.
node_modules, dist, .git, etc.)| Name | Description |
|---|---|
File Explorer: Expand Recursively |
Recursively expand all folders in the File Explorer |
| Name | Description | Default |
|---|---|---|
fileExplorer.expandRecursively.excludePatterns |
Folder names or glob patterns to skip during recursive expansion | .git, .svn, .vs, .vscode, .cache, __pycache__, node_modules, dist, packages, build, target, Release, Debug, bin, obj |
Walks the directory tree using the VS Code filesystem API, expanding each folder via revealInExplorer and list.expand. Folders matching the exclude patterns are skipped automatically.
When you rename a file in the Explorer, the matching class or export inside it is automatically renamed too (using the language server’s rename provider), cascading the change across the entire project.
foo-entity → FooEntity)foo-bar.component.ts → FooBarComponent.ts, .tsx, .js, .jsx, .java, .kt, .cs, .py, .go| File rename | Symbol rename |
|---|---|
foo-entity.ts → bar-entity.ts |
FooEntity → BarEntity |
bar-entity.ts → bar-entity.component.ts |
BarEntity → BarEntityComponent |
FooService.java → BarService.java |
FooService → BarService |
| Name | Description | Default |
|---|---|---|
fileExplorer.renameCascade.mode |
"always" auto-rename, "prompt" ask first, "never" disable entirely |
"prompt" |
Listens for onDidRenameFiles events, strips the language extension, derives the old and new PascalCase symbol names from the remaining file name (including compound parts like .component, .module), finds the old symbol in the file content, and invokes vscode.executeDocumentRenameProvider to rename it project-wide.