Reference Counter for VSCode


Why Use Reference Counter?
- Identify Dead Code: Find unused functions/classes for safe removal
- Understand Impact: See function usage before refactoring
- Improve Code Quality: Maintain cleaner codebase
- Save Time: Eliminate manual reference searches
Features
- Inline Reference Counts: Display usage counts next to definitions
- Unused Symbols View: Dedicated sidebar for zero-reference symbols
- Multi-language Support: Python, JavaScript, TypeScript
- Performance Optimized: Auto-excludes node_modules/build folders
- Real-time Updates: Config changes apply immediately
- Smart Import Handling: Excludes imports by default (configurable)

Configuration
{
"referenceCounter.fileExtensions": ["py", "js", "jsx", "ts", "tsx"],
"referenceCounter.excludePatterns": [
"node_modules",
".next",
"dist",
"build"
],
"referenceCounter.includeImports": false,
"referenceCounter.minimalisticDecorations": true
}
Setting |
Description |
Default Value |
referenceCounter.fileExtensions |
File extensions to include |
["py", "js", "jsx", "ts", "tsx"] |
referenceCounter.excludePatterns |
Glob patterns to exclude |
Common build/node_modules |
referenceCounter.includeImports |
Count import statements as references |
false |
referenceCounter.minimalisticDecorations |
Use compact reference display |
true |
Development Setup
git clone https://github.com/gosvig123/reference_count_extension.git
cd reference_count_extension
npm install
npm run compile
Commands:
npm run package : Production build
npm run watch : Auto-rebuild on changes
npm run lint : Run linter
npm run test : Run tests
Contributing
We welcome contributions! Please:
- Report bugs via GitHub Issues
- Suggest new features
- Submit PRs for improvements
- Improve documentation
License
MIT Licensed - See LICENSE for details.
| |