parent
b5a068737f
commit
4053f19333
@ -1,57 +1,57 @@
|
|||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
require("neotest").setup({
|
require("neotest").setup({
|
||||||
adapters = {
|
adapters = {
|
||||||
require("neotest-jest"),
|
require("neotest-jest"),
|
||||||
require("neotest-python"),
|
require("neotest-python"),
|
||||||
require("neotest-go"),
|
require("neotest-go"),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
local run_current_test_keybiding = {
|
local run_current_test_keybiding = {
|
||||||
function()
|
function()
|
||||||
require("neotest").run.run()
|
require("neotest").run.run()
|
||||||
end,
|
end,
|
||||||
"Current test",
|
"Current test",
|
||||||
}
|
}
|
||||||
|
|
||||||
local keybindings = {
|
local keybindings = {
|
||||||
name = "Test",
|
name = "Test",
|
||||||
t = run_current_test_keybiding,
|
t = run_current_test_keybiding,
|
||||||
T = {
|
T = {
|
||||||
function()
|
function()
|
||||||
require("neotest").run.run(vim.fn.expand("%"))
|
require("neotest").run.run(vim.fn.expand("%"))
|
||||||
end,
|
end,
|
||||||
"Current file",
|
"Current file",
|
||||||
},
|
},
|
||||||
d = {
|
d = {
|
||||||
function()
|
function()
|
||||||
require("neotest").run.run({ strategy = "dap" })
|
require("neotest").run.run({ strategy = "dap" })
|
||||||
end,
|
end,
|
||||||
"Debug current test",
|
"Debug current test",
|
||||||
},
|
},
|
||||||
s = {
|
s = {
|
||||||
function()
|
function()
|
||||||
require("neotest").run.stop()
|
require("neotest").run.stop()
|
||||||
end,
|
end,
|
||||||
"Stop running test",
|
"Stop running test",
|
||||||
},
|
},
|
||||||
a = {
|
a = {
|
||||||
function()
|
function()
|
||||||
require("neotest").run.attach()
|
require("neotest").run.attach()
|
||||||
end,
|
end,
|
||||||
"Attach to running test",
|
"Attach to running test",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register({
|
wk.register({
|
||||||
r = {
|
r = {
|
||||||
t = run_current_test_keybiding,
|
t = run_current_test_keybiding,
|
||||||
T = keybindings,
|
T = keybindings,
|
||||||
},
|
},
|
||||||
c = {
|
c = {
|
||||||
T = keybindings,
|
T = keybindings,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
prefix = "<leader>",
|
prefix = "<leader>",
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in new issue