Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Package.json Prefix FolderNew to Visual Studio Code? Get it now.
Package.json Prefix Folder

Package.json Prefix Folder

唐铃

|
3 installs
| (0) | Free
Fold package.json dependency entries by shared package name prefixes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Package.json Prefix Folder

This VS Code extension folds dependency entries inside package.json when consecutive packages share the same prefix, making long dependency lists easier to scan.

Examples:

  • @types/node, @types/react -> grouped by @types/
  • react-dom, react-pdf, react-router-dom -> grouped by react-

Screenshots

Auto-fold matching dependency prefixes

Auto-fold matching dependency prefixes

Fold scoped packages such as @types/*

Fold scoped packages such as @types/*

Show hidden count inline for each folded group

Show hidden count inline for each folded group

Features

  • Automatically scans common dependency sections such as dependencies and devDependencies
  • Adds custom folding ranges for prefix groups
  • Automatically folds matching groups when a package.json file is opened
  • Shows an inline badge with the hidden package count for each folded group
  • Supports both scoped prefixes like @types/ and unscoped prefixes like react-

Commands

  • Package.json Prefix Fold: Fold Current File
  • Package.json Prefix Fold: Unfold Current File

Settings

  • packageJsonPrefixFolder.enabled
  • packageJsonPrefixFolder.autoFoldOnOpen
  • packageJsonPrefixFolder.minimumGroupSize
  • packageJsonPrefixFolder.unscopedPrefixSegments
  • packageJsonPrefixFolder.sections
  • packageJsonPrefixFolder.showInlineBadge

Notes

  • Scoped packages are grouped by scope, for example @types/.
  • Unscoped packages are grouped by the configured number of dash-separated segments.
  • VS Code does not currently expose exact manual fold state to extensions, so the inline count is synchronized with folds triggered automatically by the extension or through the extension commands.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft