mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
plugins/coverage: init + test
This commit is contained in:
parent
9324c825b9
commit
58ccb99e2d
3 changed files with 406 additions and 0 deletions
86
tests/test-sources/plugins/utils/coverage.nix
Normal file
86
tests/test-sources/plugins/utils/coverage.nix
Normal file
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.coverage.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.coverage = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = true;
|
||||
keymaps = {
|
||||
coverage = "<leader>a";
|
||||
load = "<leader>b";
|
||||
show = "<leader>c";
|
||||
hide = "<leader>d";
|
||||
toggle = "<leader>e";
|
||||
clear = "<leader>f";
|
||||
summary = "<leader>g";
|
||||
};
|
||||
|
||||
autoReload = false;
|
||||
autoReloadTimeoutMs = 500;
|
||||
commands = true;
|
||||
highlights = {
|
||||
covered = {fg = "#B7F071";};
|
||||
uncovered = {fg = "#F07178";};
|
||||
partial = {fg = "#AA71F0";};
|
||||
summaryBorder = {link = "FloatBorder";};
|
||||
summaryNormal = {link = "NormalFloat";};
|
||||
summaryCursorLine = {link = "CursorLine";};
|
||||
summaryHeader = {
|
||||
style = "bold,underline";
|
||||
sp = "bg";
|
||||
};
|
||||
summaryPass = {link = "CoverageCovered";};
|
||||
summaryFail = {link = "CoverageUncovered";};
|
||||
};
|
||||
loadCoverageCb = ''
|
||||
function (ftype)
|
||||
vim.notify("Loaded " .. ftype .. " coverage")
|
||||
end
|
||||
'';
|
||||
signs = {
|
||||
covered = {
|
||||
hl = "CoverageCovered";
|
||||
text = "▎";
|
||||
};
|
||||
uncovered = {
|
||||
hl = "CoverageUncovered";
|
||||
text = "▎";
|
||||
};
|
||||
partial = {
|
||||
hl = "CoveragePartial";
|
||||
text = "▎";
|
||||
};
|
||||
};
|
||||
signGroup = "coverage";
|
||||
summary = {
|
||||
widthPercentage = 0.70;
|
||||
heightPercentage = 0.50;
|
||||
borders = {
|
||||
topleft = "╭";
|
||||
topright = "╮";
|
||||
top = "─";
|
||||
left = "│";
|
||||
right = "│";
|
||||
botleft = "╰";
|
||||
botright = "╯";
|
||||
bot = "─";
|
||||
highlight = "Normal:CoverageSummaryBorder";
|
||||
};
|
||||
minCoverage = 80;
|
||||
};
|
||||
lang = {
|
||||
python = {
|
||||
coverage_file = ".coverage";
|
||||
coverage_command = "coverage json --fail-under=0 -q -o -";
|
||||
};
|
||||
ruby = {
|
||||
coverage_file = "coverage/coverage.json";
|
||||
};
|
||||
};
|
||||
lcovFile = null;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue