StanzaLineCounter

VS Code / Cursor extension that displays the line count of each file directly in the Explorer panel.

Features
- Line count badges — Each file shows a compact line count badge next to its name.
- Threshold alert — Files exceeding the configured limit are highlighted with a nice blue color.
- Excluded extensions — Skip files with specific extensions (logs, minified files, maps, images, fonts, archives, media files by default).
- Live refresh — Badges update automatically on file save, creation, deletion, and configuration changes.
| Lines |
Badge |
Example |
| 0–99 |
As-is |
42 |
| 100–999 |
Xc |
3c (≈ 300) |
| 1,000–9,999 |
Xk |
1k |
| 10,000+ |
∞ |
∞ |
The exact line count is always shown in the tooltip on hover.
Requirements
Installation
From the marketplace
- Open VS Code or Cursor.
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X).
- Search for StanzaLineCounter.
- Click Install.
Via VSIX if you cannot see the extension
If the extension does not appear in the marketplace (e.g. in Cursor), install it from a VSIX file:
Generate the VSIX (from the project root):
npm install
npm run compile
npx vsce package
This creates a file like stanza-line-counter-0.2.0.vsix.
Install the VSIX in VS Code or Cursor:
- Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
- Run Extensions: Install from VSIX....
- Select the generated
.vsix file.
Manual installation (copy folder)
- Download the latest release or clone this repository.
- Copy the folder to
~/.vscode/extensions/ (or your Cursor extensions directory).
- Restart the editor.
Configuration
| Setting |
Type |
Default |
Description |
lineCounter.limit |
number |
300 |
Line threshold — files above this show a warning badge. |
lineCounter.excludeExtensions |
string[] |
[".log", ".min.js", ".map", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".ico", ".woff", ".woff2", ".ttf", ".pdf", ".zip", ".gz", ".tar", ".mp3", ".mp4", ".bin"] |
File extensions to exclude from counting. |
Development
# Clone the repository
git clone https://github.com/psychobarge/StanzaLineCounter.git
cd StanzaLineCounter
# Install dependencies
npm install
# Compile
npm run compile # or npm run watch for watch mode
Press F5 in VS Code / Cursor to launch the Extension Development Host and test the extension.
License
MIT © psychobarge
| |