Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hexagonal Context FilterNew to Visual Studio Code? Get it now.
Hexagonal Context Filter

Hexagonal Context Filter

Matías Rodríguez

|
2 installs
| (0) | Free
Filter the VS Code Explorer to show only the selected hexagonal context and its contents.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hexagonal Context Filter

Overview

Hexagonal Context Filter is a Visual Studio Code extension that helps you focus on a specific hexagonal context (module) in your project. It hides everything in the Explorer except the selected context and its contents, making it easier to work in large codebases that follow the hexagonal architecture.

Features

  • Filter the VS Code Explorer to show only the selected hexagonal context and its subfolders/files.
  • Hide all other folders and files, including files in the workspace root.
  • Easily clear the filter to restore the full project view.
  • Status bar controls for quick context switching and filter clearing.
  • Detects typical hexagonal structure (Domain, Application, Infrastructure) and shows a summary.

Quick Start

  1. Install the extension in VS Code.
  2. Open your project.
  3. Click the "Hexagonal" icon in the status bar or run the command:
    • Hexagonal Context Filter: Set Context
  4. Select a context from the list. Only that context and its contents will be visible in the Explorer.
  5. To clear the filter and show everything again, click the clear (X) icon in the status bar or run:
    • Hexagonal Context Filter: Clear Context

Configuration

You can configure where the extension looks for contexts and which folders to exclude by default. In your VS Code settings (settings.json):

"hexagonal-context-filter.contextPaths": [
  "src/contexts",
  "src/modules",
  "contexts",
  "modules"
],
"hexagonal-context-filter.excludePatterns": [
  "**/node_modules/**",
  "**/.git/**",
  "**/dist/**",
  "**/build/**"
]
  • contextPaths: List of folders where your hexagonal contexts are located.
  • excludePatterns: Patterns to always exclude from the Explorer.

Commands

  • Set Context: Filter the Explorer to a specific context.
  • Clear Context: Remove the filter and show the whole project.
  • Show Context List: Browse and select from all available contexts.
  • Show All Contexts: Restore the full view (same as clear).

Status Bar

  • The status bar shows the current context. Click it to change context.
  • The X icon clears the filter.
  • The list icon shows all contexts.

Example Workflow

  1. Open your project in VS Code.
  2. Click the status bar or run the command to set a context.
  3. Work focused only on that context—everything else is hidden.
  4. Click the X or run the clear command to see your whole project again.

Notes

  • Only one context can be active at a time.
  • The extension does not move or delete files—only changes what is visible in the Explorer.
  • If you have deeply nested contexts, only the selected context and its contents will be visible; parent folders will be hidden.

Notes & Behavior

  • The extension automatically clears any previous context filter when you open your project, so you always start with the full explorer view.
  • When you select a context, the extension will automatically expand and reveal the context folder in the Explorer for you.
  • While a context filter is active, files in the workspace root are hidden for maximum focus. They will reappear when you clear the filter.
  • The extension is always active in your workspace to ensure the explorer is reset and ready every time you open your project.

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft