You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.1 KiB

local init = function()
local wk = require("which-key")
2 years ago
local run_current_test_keybiding = {
function()
require("neotest").run.run()
end,
"Current test",
}
2 years ago
local keybindings = {
name = "Test",
t = run_current_test_keybiding,
T = {
function()
require("neotest").run.run(vim.fn.expand("%"))
end,
"Current file",
},
d = {
function()
require("neotest").run.run({ strategy = "dap" })
end,
"Debug current test",
},
s = {
function()
require("neotest").run.stop()
end,
"Stop running test",
},
a = {
function()
require("neotest").run.attach()
end,
"Attach to running test",
},
}
2 years ago
wk.register({
r = {
t = run_current_test_keybiding,
T = keybindings,
},
c = {
T = keybindings,
},
}, {
prefix = "<leader>",
})
end
2 years ago
return {
{
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-jest",
"nvim-neotest/neotest-go",
"nvim-neotest/neotest-python",
},
opts = {
adapters = {
require("neotest-jest"),
require("neotest-python"),
require("neotest-go"),
},
},
},
}