diff options
| author | Ivan K. Boikov <mail@ikboikov.net> | 2025-01-26 00:12:20 +0100 |
|---|---|---|
| committer | Ivan K. Boikov <mail@ikboikov.net> | 2025-01-26 00:12:20 +0100 |
| commit | 80b34ca609ef42314ba82b8fbdc3ae39d2565f69 (patch) | |
| tree | c6425c0784b9902bb33cdbc5850f40d5a19f9821 | |
| parent | 275beaa95ad47432f72cf6796930837c7441bfae (diff) | |
nvim: coverage
| -rw-r--r-- | nvim/.config/nvim/init.vim | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index be9c5fd..3f48e8e 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -47,8 +47,9 @@ call minpac#add('tpope/vim-commentary') call minpac#add('Thyrum/vim-stabs') " tabs for beginning of lines, spaces otherwise call minpac#add('vim-autoformat/vim-autoformat') -call minpac#add('nvim-lua/plenary.nvim') " dep for refactoring +call minpac#add('nvim-lua/plenary.nvim') " dep for refactoring and coverage call minpac#add('ThePrimeagen/refactoring.nvim') +call minpac#add('andythigpen/nvim-coverage') " snippets call minpac#add('hrsh7th/nvim-cmp') @@ -524,6 +525,35 @@ vim.keymap.set("n", "<leader>rbf", ":Refactor extract_block_to_file") EOF + +lua <<EOF +require("coverage").setup({ + commands = true, -- create commands + highlights = { + -- customize highlight groups created by the plugin + covered = { fg = "#C3E88D" }, -- supports style, fg, bg, sp (see :h highlight-gui) + uncovered = { fg = "#F07178" }, + }, + signs = { + -- use your own highlight groups or text markers + covered = { hl = "CoverageCovered", text = "▎" }, + uncovered = { hl = "CoverageUncovered", text = "▎" }, + }, + summary = { + -- customize the summary pop-up + min_coverage = 80.0, -- minimum coverage threshold (used for highlighting) + }, + lang = { + -- customize language specific settings + }, +}) +EOF +nmap <Leader>cc :Coverage<CR> +nmap <Leader>ct :CoverageToggle<CR> +nmap <Leader>cs :CoverageSummary<CR> + + + " learning French with vim-translator! function! LearnFrenchMode() |
