Conversation
New vscode-extension/ folder: a TypeScript extension bringing the Nestify workflow to VS Code's native Explorer file nesting engine (explorer.fileNesting.patterns) - no hand-editing settings JSON. Commands (Explorer context menu + Command Palette): - Nestify: Nest under... - picker-based manual nesting with the same UX as the Visual Studio version (multi-select parent candidates, same-folder guard, cycle prevention). Writes exact-name pattern entries. - Nestify: Unnest - removes exact-name entries from workspace and user settings; only touches nested files. - Nestify: Auto-nest - applies the same naming rules as the VS extension as glob patterns (C# interfaces, markdown docs for .cs/.vb/.ts/.tsx/.js/ .jsx, minified/bundled JS chain); rules keep working as files are created. - Nestify: Remove auto-nest rules - surgically removes exactly what Auto-nest added. - Nestify: Toggle file nesting - flips explorer.fileNesting.enabled (also auto-enabled on first nest). Implementation: - Pure pattern logic in src/patterns.ts with 13 unit tests (node:test); VS Code glue in src/extension.ts. Strict TypeScript, no runtime deps. - Settings written at workspace scope when a workspace is open, user scope otherwise, using scope-accurate reads via config.inspect. - Publisher Root18, author Imad Al-Muhtadi; 128x128 icon; packages to a 37 KB VSIX with vsce. Root README updated with a Nestify for VS Code section and project structure entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The marketplace item ID Root18.nestify is already taken by the Visual Studio extension (item IDs are publisher.name across both VS and VS Code extensions), so uploading the VS Code package failed with an extension-already-exists error. The internal package name is now nestify-vscode (marketplace ID Root18.nestify-vscode); the displayed name stays Nestify. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new companion VS Code extension under vscode-extension/ that brings Nestify’s manual/automatic file nesting workflow to VS Code’s native explorer.fileNesting.patterns setting.
Changes:
- Added a VS Code extension with commands for nest/unnest/auto-nest/remove auto rules/toggle nesting.
- Implemented pure pattern-manipulation helpers (
src/patterns.ts) withnode:testunit coverage. - Added VS Code extension packaging/docs scaffolding (README, changelog, license, ignore files) and updated the repo root README to reference the new extension.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vscode-extension/tsconfig.json | TS build configuration for the extension code. |
| vscode-extension/src/test/patterns.test.ts | Unit tests covering pattern helper behavior. |
| vscode-extension/src/patterns.ts | Core logic for reading/merging/removing nesting patterns and built-in auto rules. |
| vscode-extension/src/extension.ts | VS Code command implementations and settings read/write behavior. |
| vscode-extension/README.md | User-facing documentation for the VS Code extension. |
| vscode-extension/package.json | Extension manifest (commands, menus, scripts, engines, dev deps). |
| vscode-extension/package-lock.json | Lockfile for the extension’s dev dependencies. |
| vscode-extension/LICENSE | License file for the VS Code extension. |
| vscode-extension/CHANGELOG.md | Initial changelog entry for v0.1.0. |
| vscode-extension/.vscodeignore | Packaging ignore rules for VSIX. |
| vscode-extension/.gitignore | Local build artifact ignores for the extension folder. |
| README.md | Root README updates to document the VS Code companion extension. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Auto-nest** — Apply built-in naming rules so related files nest automatically, now and as new files are created: | ||
| - C# implementations nest under their interfaces (`UserService.cs` → `IUserService.cs`) | ||
| - Markdown documentation nests under the matching code file (`UserService.md` → `UserService.cs`; also `.vb`, `.ts`, `.tsx`, `.js`, `.jsx`) | ||
| - Minified/bundled JS nests under its source (`app.min.js` → `app.js`, `app.bundle.js` → `app.js`, `app.bundle.min.js` → `app.bundle.js`) |
| - C# implementations nest under their interfaces (`UserService.cs` → `IUserService.cs`) | ||
| - Markdown documentation nests under the matching code file (`UserService.md` → `UserService.cs`; also `.vb`, `.ts`, `.tsx`, `.js`, `.jsx`) | ||
| - Minified/bundled JS nests under its source (`app.min.js` → `app.js`, `app.bundle.js` → `app.js`, `app.bundle.min.js` → `app.bundle.js`) | ||
| - **Remove auto-nest rules** — Cleanly removes exactly the rules Auto-nest added, leaving your own patterns untouched. |
Comment on lines
+42
to
+47
| /** | ||
| * Nest the given child file names under the given parent file name. | ||
| * A file can only have one parent, so the children are removed from every other | ||
| * entry first; the parent is also removed from the children's own entries so a | ||
| * cycle cannot be created. | ||
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Nestify for VS Code, a companion extension living in
vscode-extension/, bringing the Nestify workflow to VS Code's native Explorer file nesting engine (explorer.fileNesting.patterns).Features
.cs/.vb/.ts/.tsx/.js/.jsx, minified/bundled JS chain); rules keep working as new files are created.explorer.fileNesting.enabled(also auto-enabled on first nest).Implementation
src/patterns.tswith 13 unit tests (node:test); VS Code glue insrc/extension.ts. Strict TypeScript, no runtime dependencies.config.inspect.nestify-vscode(marketplace IDRoot18.nestify-vscode) becauseRoot18.nestifyis already taken by the Visual Studio extension; displayed name stays Nestify.Root18, author Imad Al-Muhtadi, 128x128 icon; packages to a 37 KB VSIX with vsce.Test plan
npm test).vscode/settings.json🤖 Generated with Claude Code