VS Code's built-in Explorer does not expose a public API for adding arbitrary table columns. otak-filemeter uses the supported decoration API instead: each file gets a compact badge, and exact details are available from the hover tooltip.

Capabilities
- Metrics tooltip: hover the decoration to see line count and file size.
- Small marker badge: uses a compact
i badge because VS Code decoration tooltips need a decoration target.
- Bounded line counting: line counts are calculated only for files under the configured byte limit.
- Bounded memory: files are counted a chunk at a time, so measuring holds 64 KB whatever the file's size, and the remembered measurements are capped.
- Scanner-friendly reading: files VS Code already has open are never read, types that can only be binary are never opened, and reads in flight are capped at 4.
- Batched redraws: file changes are announced as one event, so a build or a branch switch does not turn into thousands of decoration round trips.
- Local only: no telemetry, no network calls, and no workspace writes.
Settings
| Setting |
Default |
Description |
otakFilemeter.enabled |
true |
Enables Explorer file metric badges. |
otakFilemeter.maxLineCountBytes |
1048576 |
Maximum file size read for line counting in tooltips. Set to 0 to disable line counting. |
Commands
| Command |
Description |
otak-filemeter: Refresh File Meter Badges |
Clears cached metrics and asks VS Code to refresh Explorer decorations. |
Notes
Explorer decoration badges are intentionally kept to a short i marker. Hover the marker to see:
Lines: 100 lines
Size: 5.0 KB
Reading Files
A line count needs the file's contents, and reading a file's contents is exactly what makes an on-access virus scanner such as Sophos or Microsoft Defender scan it — so otak-filemeter reads as little as it can get away with.
A file that is already open in an editor is answered from the editor's own line count, without any read at all. A file whose type can only be binary is never opened, because its line count would be discarded anyway. Everything else is read a chunk at a time and stops early if the first chunk shows binary content, and no more than four files are read at once, so revealing a folder does not arrive at the scanner as a burst. Only file sizes and line counts are remembered afterwards, capped at 4096 files, so the same file is not read again while it is unchanged.
Requirements
Installation
Install from the VS Code Marketplace, or run:
ext install odangoo.otak-filemeter
Build from source (VSIX)
npm install
npm run package
code --install-extension otak-filemeter-0.1.9.vsix
Reload VS Code afterwards if the Explorer was already open.
Troubleshooting
- Badges do not appear after installing the VSIX: run
Developer: Reload Window once. Version 0.1.3 activates immediately, but a reload is still the fastest way to refresh an already-open Explorer.
- No Explorer decorations appear at all: confirm
Explorer: Decorations: Badges is enabled in VS Code settings.
- Modified files still show
M: VS Code and the built-in Git extension may prioritize source-control badges over extension-provided badges. Try hovering unmodified files first.
- Line count shows unavailable: the file is larger than
otakFilemeter.maxLineCountBytes, could not be read, or looks like binary content.
Security & Privacy
- No telemetry: no analytics, identifiers, or usage tracking.
- No network calls: it never uploads file names or file contents.
- No workspace writes: it reads metadata and small text file contents only to decorate the Explorer.
More VS Code extensions by odangoo:
| Extension |
Description |
| otak-paste |
Paste optimized screenshots into Markdown assets |
| otak-proxy |
One-click proxy switching for VS Code, Git, npm, and integrated terminals |
| otak-monitor |
Real-time CPU, memory, and disk usage in the status bar |
| otak-committer |
AI-assisted commit messages, pull requests, and issues |
| otak-clipboard |
Copy a folder or the current tab to your clipboard in two clicks |
| otak-clock |
Dual time-zone clock for the status bar |
| otak-zen |
A calm, distraction-free Zen mode for VS Code |
| otak-lsp |
Japanese morphological analysis with grammar checks, semantic highlights, and hovers |
| otak-usage |
At-a-glance usage statistics for VS Code |
License
Released under the MIT License.