A Neovim plugin for displaying code coverage overlays directly in your editor with smart auto-loading and file watching.
- Multi-Format Support: LCOV, LLVM JSON, Cobertura XML, Go Coverprofile, GCOV, LLVM Profdata
- Smart Toggle: Single command auto-loads coverage and watches for changes
- Flexible Display: Show hit counts via virtual text or sign column
- Branch/Region Overlays: Inspect branch and LLVM region hit details at cursor
- Tree Integration: Coverage in NvimTree and neo-tree (optional)
- Configurable: Customize colors, display behavior, and summary popup
- Navigation: Jump between covered/uncovered/partial lines
- C/C++ - GCC (gcov/lcov), LLVM/Clang
- Go - Native
go test -coverprofile(coverage.out) - Any Language - Via LCOV, Cobertura XML, or LLVM JSON formats
The plugin supports any language that can generate coverage in one of the supported formats.
Using lazy.nvim
{
"mr-u0b0dy/crazy-coverage.nvim",
config = function()
require("crazy-coverage").setup()
end,
}Using packer.nvim
use {
"mr-u0b0dy/crazy-coverage.nvim",
config = function()
require("crazy-coverage").setup()
end,
}See Installation Guide for other plugin managers and AstroVim setup.
-- Toggle coverage (auto-loads file, watches for changes)
:CoverageToggle
-- Navigate uncovered code
]cu " Next uncovered line
[cu " Previous uncovered lineWhat the toggle does:
- Finds and loads coverage file automatically
- Enables overlay with line highlighting
- Watches file for changes (auto-reloads)
- Shows notifications on updates
- Cleans up everything when disabled
The plugin intelligently finds your coverage file automatically. It:
-
Searches Standard Directories in order:
build/coverage/- CMake build outputcoverage/- Standard coverage directorybuild/- Build directory root.- Project root
-
Detects by Content - Not just filenames:
- Finds LCOV files (even if not named
*.lcov) - Finds JSON coverage reports (even with custom names)
- Finds Cobertura XML files (regardless of filename)
- Finds Go coverprofile files (
coverage.out) - Finds GCOV/LLVM Profdata binary files
- Finds LCOV files (even if not named
-
Supports Any Filename:
✓ build/coverage_report (no extension) ✓ coverage_2025_01_09.json (custom name) ✓ results.xml (non-standard name) ✓ my_coverage_data (any name works)
You can customize the search directories in config:
require("crazy-coverage").setup({
coverage_dirs = {
"build/coverage", -- Search here first
".coverage", -- Custom location
"coverage",
".",
}
})See Configuration Reference for more details.
require("crazy-coverage").setup({
hit_count = {
show_by_default = true, -- Show hit counts when coverage is enabled
display = "eol", -- "eol", "inline", "overlay", "right_align", "sign"
},
auto_adapt_colors = true, -- Auto-adapt colors to your theme
})-- Right-aligned with branch coverage
require("crazy-coverage").setup({
hit_count = {
display = "right_align",
},
show_branch_summary = true, -- Branch overlay header: taken/total + percentage
})
-- Custom colors (disable auto-adaptation)
require("crazy-coverage").setup({
auto_adapt_colors = false,
colors = {
covered = { bg = "#1a4d1a", fg = "#66ff66" },
uncovered = { bg = "#4d1a1a", fg = "#ff6666" },
partial = { bg = "#4d4d1a", fg = "#ffff66" },
},
})
-- Auto-adapt with one manual override
require("crazy-coverage").setup({
auto_adapt_colors = true, -- Adapt most colors
colors = {
uncovered = "#660000", -- But always use dark red for uncovered
},
})Legacy options (default_show_hit_count, show_hit_count) are still supported for compatibility.
See Configuration Reference for all 15+ options.
| Command | Description |
|---|---|
:CoverageToggle |
Toggle coverage overlay (auto-loads, watches file) |
:CoverageToggleHitCount |
Toggle hit count display |
:CoverageToggleBranchOverlay |
Toggle branch overlay at cursor |
:CoverageToggleRegionOverlay |
Toggle LLVM region overlay at cursor |
:CoverageToggleNvimTree |
Toggle coverage display in NvimTree |
:CoverageToggleNeoTree |
Toggle coverage display in neo-tree |
:CoverageLoad <file> |
Manually load specific coverage file |
:CoverageSummary <project/file> |
Show coverage summary popup (alias: :CrazyCoverageSummary) |
:CoverageNextCovered |
Jump to next covered line |
:CoveragePrevCovered |
Jump to previous covered line |
:CoverageNextUncovered |
Jump to next uncovered line |
:CoveragePrevUncovered |
Jump to previous uncovered line |
:CoverageNextPartial |
Jump to next partially covered line |
:CoveragePrevPartial |
Jump to previous partially covered line |
See Usage Guide for keybindings and navigation.
- Installation Guide - Plugin managers and AstroVim setup
- Usage Guide - Commands, keybindings, and workflows
- Configuration Reference - All config options
- Supported Formats - Coverage format details
- Coverage Examples - C/C++/Go examples with GCC/LLVM/Go tools
- Architecture - Plugin design guide
- Development - Testing and contributing
- Neovim 0.7+
- Coverage files from your build system (lcov, llvm-cov, etc.)
Apache License 2.0 - Copyright © 2026 mr-u0b0dy
See Development Guide for testing and contribution guidelines.


