feat(nvim): add neotest

This commit is contained in:
Price Hiller 2024-02-09 17:58:01 -06:00
parent 03a7de5768
commit d18a7aa688
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -0,0 +1,43 @@
return {
{
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-go",
"mrcjkb/rustaceanvim",
"nvim-neotest/neotest-plenary"
},
keys = {
{ "<localleader>nrr", "<cmd>Neotest run<CR>", desc = "Neotest: Run Test" },
{ "<localleader>nrl", "<cmd>Neotest run file<CR>", desc = "Neotest: Run Tests in File" },
{ "<localleader>nrl", "<cmd>Neotest run last<CR>", desc = "Neotest: Run Last Tests" },
{ "<localleader>np", "<cmd>Neotest output-panel<CR>", desc = "Neotest: Output Panel" },
{ "<localleader>no", "<cmd>Neotest output<CR>", desc = "Neotest: Output" },
{ "<localleader>nn", "<cmd>Neotest summary toggle<CR>", desc = "Neotest: Summary Toggle" },
{ "<localleader>nk", "<cmd>Neotest jump prev<CR>", desc = "Neotest: Jump Prev" },
{ "<localleader>nj", "<cmd>Neotest jump next<CR>", desc = "Neotest: Jump Next" },
{ "<localleader>na", "<cmd>Neotest attach<CR>", desc = "Neotest: Attach" },
},
opts = function()
return {
diagnostic = {
enable = true,
severity = 1
},
discovery = {
concurrent = 4
},
status = {
virtual_text = true
},
adapters = {
require("neotest-plenary"),
require("neotest-go"),
require('rustaceanvim.neotest')
},
}
end,
},
}