Real-time color overlay showing cognitive complexity per function — like a thermal camera for code quality.
The Problem
You know a file is "too complex" but you can't tell which part to refactor. Complexity metrics live in reports and CI dashboards — far from where you're actually writing code. By the time you see a SonarQube report, you've moved on.
What It Does
Cognitive Heatmap renders a live color overlay directly on your editor showing cognitive complexity per function. Green = simple. Yellow = getting complex. Red = too complex. The overlay updates as you type.
Features
Live color overlay — real-time background tinting per function block
Four complexity bands — low (green), medium (yellow), high (red), critical (deep red)
Status bar — shows the most complex function in the current file
Complexity report — open a detailed panel listing all functions sorted by score
Keyboard shortcut — Cmd+Shift+H to toggle the heatmap
Configurable thresholds — adjust what counts as low/medium/high for your team
Debounced refresh — re-calculates after you stop typing (configurable ms)
Getting Started
The heatmap activates automatically when you open a TypeScript or JavaScript file. Color overlays appear on functions based on their complexity score.
Toggle on/off: Press Cmd+Shift+H or run Cognitive Heatmap: Toggle Overlay
See the report: Run Cognitive Heatmap: Show Complexity Report
Commands
Command
Shortcut
Description
Cognitive Heatmap: Toggle Overlay
Cmd+Shift+H
Show/hide the complexity overlay
Cognitive Heatmap: Show Complexity Report
—
Open the full complexity report for the current file