psfunc
PowerShell function explorer for Visual Studio Code.
Features
- Displays a tree view of PowerShell functions found in workspace files with extensions
.ps1, .psm1, and .psd1.
- Functions and class definitions are grouped by workspace folder and directory structure.
- Functions show a green icon, class definitions show an orange icon, and you can turn icons off with
psfunc.showIcons.
- Click a function or class node to open the file and jump directly to its definition.
- Click a file node to open the file.
- Refresh the function tree using the
Refresh PowerShell Function Tree command.
- Use
psfunc.showAllFiles to show every workspace file in the tree, not just PowerShell files that contain functions or classes.
How it works
- The extension scans workspace files matching
**/*.{ps1,psm1,psd1}.
- It parses each file for PowerShell
function declarations.
- Files without functions are excluded from the tree view.
- Function items include the function name, line location, and parameter summary when available.
- Comments immediately above a function are used to extract a synopsis if present.
Commands
psfunc.refreshTree — Refresh the function explorer tree.
psfunc.openFunction — Open a file and navigate to the selected function.
psfunc.openFile — Open the selected PowerShell file.
Notes
- The explorer only includes workspace files that actually contain PowerShell functions.
- Folder structure in the tree reflects the workspace path hierarchy.
Release Notes
0.0.1
- Initial release: PowerShell function tree explorer with file and function navigation.
0.0.2
- Added icon for defining classes and function.
- Added a setting to be able to add an icon or use the text [class] or [function] to append to the text
0.0.3
- Added a button to refresh
- Added a button to switch between showing all files or only files that have classes/functions
- Changed the hover over the function to show the synopsis with better spacing for readability
0.0.4
- Make available for Vscode 1.109
0.0.5
0.0.6
- Make function icon green to differentiate between powershell files and functions
0.0.7
- Fix sorting on folder and file level
0.0.8
0.0.9
- Add custom color setting for class and function icons; classColor and functionColor
- Now correctly jumps to correct line if there is no synopsis defined for a function
0.0.10
- Added tooltip for properties on classes
0.0.11
- Added parameter to the top of the tooltip
- Added markdown for readability
- Added parameter type for functions
| |