VS Counter is a Visual Studio Code extension that helps developers analyze source code structure by counting lines of code, comments, and file statistics across directories. It provides a rich visual interface and exportable insights to improve codebase understanding and documentation.
📦 Features
Select any folder and scan all files recursively
Count:
Total lines
Comment lines (supports line and block syntax)
Code lines (lines − comments)
Detect language based on file extensions
Exclude folders and file types using configurable settings
Sort and filter data interactively
Webview table with:
Multi-column sorting
Checkbox selection
Dynamic total calculation
Highlighting and visual styling based on theme
CSV export of selected or all files
Directory metadata display (creation and modified date)
Settings reset via command palette
⚙️ Requirements
No external dependencies. Works out of the box with VS Code v1.100.0+.
🔧 Extension Settings
This extension contributes the following settings:
vs-counter.downloadPath:
String. Default path to save CSV exports.
Default: ${home}/Downloads
vs-counter.ignoredPaths:
Array of strings. Folder names or file extensions to ignore.
Default includes: node_modules, dist, .git, media files (e.g. .jpg, .mp4), binary formats (e.g. .exe), and more.
🚀 Commands
VS Counter: Launch the folder picker and begin analysis
VS Counter: Reset Settings to Default: Resets all configuration to defaults
📷 Screenshots
Coming soon...
🐞 Known Issues
Very large directories may slow down UI interactions
Selection does not persist between folder navigations