Devel::...t::Nvim(3)

πŸ’… Devel::Cover::Report::Nvim β€” the perl manpage, but make it a group chat ✨

okay so bestie, you're reading the manual page for Devel::Cover::Report::Nvim (perl's User Contributed Perl Documentation, no cap), and honestly? It's a whole vibe. Let's get into it 🫢


🌸 NAME 🌸

Devel::Cover::Report::Nvim β€” the backend that shows your coverage data in Neovim. literally that's the job. it displays coverage data. in Neovim. slay πŸ’…


⭐ VERSION ⭐

version 1.52 β€” that's the one, bestie πŸŽ€


✨ SYNOPSIS ✨

cover -report nvim

that's it. that's the whole invocation. iconic πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

so this module gives you a reporting mechanism for displaying coverage data in Neovim using Lua. it's designed to be called from the cover program, okay? that's its whole main character energy.

by default, the output of this report is a file named coverage.lua, and it lives in the directory of the coverage database. to actually use it, run:

:luafile cover_db/coverage.lua

and boom β€” you should see signs in the left column indicating the coverage status of that line. it's giving helpful. it's giving ✨illuminated✨.

the signs are as follows:

P - Pod coverage
S - Statement coverage
R - Subroutine coverage
B - Branch coverage
C - Condition coverage

now here's the tea β˜• β€” the last of the criteria, in the order given above, is the one which is displayed. correctly covered criteria are shown in green. incorrectly covered criteria are shown in red. and any incorrectly covered criterion will override a correctly covered criterion. the red just wins, periodt πŸ’€

if the coverage for the file being displayed is out of date, the function called coverage_old() is called and passed the name of the file. similarly, for current coverage data file coverage_valid() is called. cute little callbacks, honestly obsessed.

colors and signs can be customized using global vim variables. set these in your init.lua or init.vim file before loading the coverage script (order matters bestie, don't come for me πŸ™ˆ).

available configuration variables:

  • vim.g.devel_cover_fg β€” foreground color for covered lines (default: "Green")
  • vim.g.devel_cover_error_fg β€” foreground color for uncovered lines (default: "Red")
  • vim.g.devel_cover_bg β€” background color for covered lines (default: nil)
  • vim.g.devel_cover_error_bg β€” background color for uncovered lines (default: nil)
  • vim.g.devel_cover_valid_bg β€” background when coverage is current (default: nil)
  • vim.g.devel_cover_old_bg β€” background when coverage is old (default: nil)
  • vim.g.devel_cover_cterm β€” terminal styling (default: "bold")
  • vim.g.devel_cover_gui β€” GUI styling (default: "bold")
  • vim.g.devel_cover_linehl β€” line highlight group for covered (default: "cov")
  • vim.g.devel_cover_linehl_error β€” line highlight group for errors (default: "err")
  • vim.g.devel_cover_signs β€” custom sign text table
  • vim.g.devel_cover_sign_group β€” sign group name for dedicated column (default: "DevelCover")
  • vim.g.devel_cover_sign_priority β€” sign priority within group (default: 10)

πŸŽ€ example configuration for solarized theme in init.lua πŸŽ€

this is the moment. this is the whole thing. look at it πŸ”₯

-- Set colors before loading coverage
vim.g.devel_cover_fg = "#859900"        -- solarized green
vim.g.devel_cover_error_fg = "#dc322f"  -- solarized red
vim.g.devel_cover_valid_bg = "#073642"  -- solarized base02
vim.g.devel_cover_old_bg = "#342a2a"    -- darker red-tinted background
vim.g.devel_cover_cterm = "NONE"
vim.g.devel_cover_gui = "NONE"

-- Custom sign characters (optional)
-- Note: The same character is used for both covered/uncovered
-- The difference is shown through fg/bg colors defined above
vim.g.devel_cover_signs = {
  pod = "P ",
  subroutine = "R ",
  statement = "Β· ",  -- Subtle dot for statements (most common)
  branch = "B ",
  condition = "C "
}

-- Or for a minimal look that relies purely on colors
vim.g.devel_cover_bg = "#002b36"        -- dark for covered
vim.g.devel_cover_error_bg = "#2d1616"  -- dark red for uncovered
vim.g.devel_cover_signs = {
  pod = "  ",
  subroutine = "  ",
  statement = "β”‚ ",  -- Thin vertical bar (unobtrusive)
  branch = "  ",
  condition = "  "
}

-- Or use subtle Unicode characters
vim.g.devel_cover_signs = {
  pod = "ΒΆ ",
  subroutine = "Ζ’ ",
  statement = "β€’ ",  -- Small bullet (unobtrusive)
  branch = "Β» ",
  condition = "? "
}

-- For a dedicated coverage column (recommended)
-- This keeps coverage signs separate from other signs like diagnostics
vim.g.devel_cover_sign_group = "DevelCover"  -- Creates its own column

-- You can also configure the sign column appearance
vim.o.signcolumn = "yes:2"  -- Show 2 sign columns (1 for diagnostics, 1 for coverage)

alternative: you can still override via devel-cover.lua in your config directory for more complex customizations. yes bestie, there's an escape hatch if you wanna go feral with it πŸ’…

this configuration sets the background colour of the signs to a dark red when the coverage data is out of date. dark red = stale data, we love a visual warning 🌈

coverage.lua adds two user commands: :Cov and :Uncov which can be used to toggle the state of coverage signs. toggle toggle toggle πŸ¦‹

the idea and the lua template is adapted from the Vim version which was shamelessly stolen from Simplecov-Vim. see https://github.com/nyarly/Simplecov-Vim β€” credit where credit is due, fr fr πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

go read those too, they're the extended universe 🧚


πŸ’œ LICENCE πŸ’œ

Copyright 2012-2026, Paul Johnson (paul@pjcj.net)

This software is free. It is licensed under the same terms as Perl itself.

The latest version of this software should be available from my homepage: https://pjcj.net

The template is adapted from the Vim version which was copied from Simplecov-Vim (https://github.com/nyarly/Simplecov-Vim) and is under the MIT Licence.

πŸ“ The MIT License πŸ“

Copyright (c) 2011 Judson Lester

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

legal text stays untouched bestie β€” that's not a vibe thing, that's a lawyer thing 😭

🫠 POD ERRORS 🫠

hey! the above document had some coding errors, which are explained below:

Around line 491:

Non-ASCII character seen before =encoding in '"Β·'. Assuming UTF-8

not the Β· catching a stray error πŸ’€ it's fiiine, it assumed UTF-8, we move πŸ’…


and that's the page, bestie! ✨ this was perl v5.42.2, dated 2026-03-07 β€” go forth and cover your code, you absolute icon πŸ‘‘πŸŽ€

πŸ“¦ where this page comes from