This extension provides an interactive project tree for your workspace. It can generate a project directory tree and copy it to your clipboard. Additionally, you can insert a comment at the top of your current file containing the relative path to the file from the root of the project.
Features
1. Generate Project Tree
Generates a tree representation of the project's directory structure.
The tree is copied to the clipboard and can be used in documentation, notes, or comments.
2. Comment File Path
Inserts a comment at the top of the current file with its relative path from the project root.
This feature helps developers quickly reference the file’s location within the project.
Commands
Generate Project Tree
Command ID: projectTree.generateTree
Generates and copies the project directory structure to the clipboard.
Comment File Path
Command ID: projectTree.commentFilePath
Adds a comment with the relative path of the active file at the top of the document.
Requirements
Visual Studio Code version 1.60.0 or higher.
This extension works best in workspaces with a well-defined root directory.
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
Search for Project Tree.
Click Install.
Usage
After installing the extension, you will see a Project Tree in the Activity Bar.
Right-click on the tree for more options, or use the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and search for the commands.