Skip to content

Nestify for VS Code (vscode-v0.1.0) - #9

Merged
Root18 merged 3 commits into
mainfrom
develop
Jul 8, 2026
Merged

Nestify for VS Code (vscode-v0.1.0)#9
Root18 merged 3 commits into
mainfrom
develop

Conversation

@Root18

@Root18 Root18 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

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

  • Nestify: Nest under... — picker-based manual nesting from the Explorer context menu, with the same UX as the Visual Studio version (multi-select parent candidates, same-folder guard, cycle prevention). Writes exact-name pattern entries to workspace settings.
  • 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 new 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 dependencies.
  • Settings written at workspace scope when a workspace is open, user scope otherwise, using scope-accurate reads via config.inspect.
  • Package name is nestify-vscode (marketplace ID Root18.nestify-vscode) because Root18.nestify is already taken by the Visual Studio extension; displayed name stays Nestify.
  • 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.

Test plan

  • 13/13 unit tests pass (npm test)
  • Compiles clean under strict TypeScript
  • Packaged with vsce and installed locally; nest/unnest/auto-nest verified against .vscode/settings.json

🤖 Generated with Claude Code

Root18 and others added 3 commits July 8, 2026 15:58
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>
Copilot AI review requested due to automatic review settings July 8, 2026 16:00
@Root18
Root18 merged commit bdad937 into main Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) with node:test unit 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.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants