How andythigpen/nvim-coverage works
Main Components Structure
a. Core Layer (top)
b. Language Support Layer (middle)
c. Parser Layer (bottom)
Component Details
Core Layer:
• Config Manager (config.lua)
• Sign Manager (signs.lua)
• Manager (highlight.lua)
• Report Generator (report.lua)
• Summary Generator (summary.lua)
• Watch Service (watch.lua)
Language Support Layer:
• Common Language Interface (languages/common.lua)
• Individual Language Modules (group the 20+ language files)
• Inheritance/implementation relationship from common to specific
Parser Layer:
• "Parsers" container with:
• LCOV Parser (lcov.lua)
• Cobertura Parser (parsers/corbertura.lua)
Interactions and Data Flow
• External coverage file → Parsers
• Parsers → Language Handlers
• Language Handlers → Core Module components
• Core Module → Neovim Interface (signs, highlights, windows)
Integration Points
• External dependencies:
• Plenary.nvim connection
• Optional lua-xmlreader for Cobertura
• Neovim API interface points