⚠️ Early Development Warning: This extension is in early development stages and may contain bugs or unexpected behavior. Use at your own risk.
Focus Tree is a Visual Studio Code extension that helps you organize and focus on specific sets of files in your workspace. It provides an additional tree view that shows only the files and folders you're currently interested in working with, making it easier to navigate large codebases.
Features
Configure sets of related files and folders using a simple YAML configuration
Switch between different sets of files based on your current task
Supports both individual files and entire directories
Handles overlapping file sets without duplicates
Maintains proper folder hierarchy in the tree view
Setup
Create a .focus.yml file in your workspace root
Define your file sets using the following format:
selected:
- common # Currently active sets
- users # You can have multiple active sets
sets:
common: # A set to use for all contexts
- Gemfile
- spec/
users: # A set related to users
- app/controllers/users_controller.rb
- app/models/user.rb
Usage
Once you have your .focus.yml file configured, the Focus Tree view will appear in your explorer sidebar
The tree will show all files and folders from your currently selected sets
You can navigate the tree just like the regular file explorer
Update the selected section in .focus.yml to switch between different sets of files
Configuration Structure
The .focus.yml file has two main sections:
selected: An array of set names that should be currently visible in the tree
sets: A map of set names to arrays of file/folder paths
Paths are relative to your workspace root
Including a folder path will include all its contents recursively
The same file can appear in multiple sets without creating duplicates in the tree