nvim/lua/plugins/nvim_test.lua

29 lines
812 B
Lua

return {
"klen/nvim-test",
cmd = {
"TestFile",
"TestEdit",
"TestNearest",
"TestLast",
"TestVisit",
"TestInfo",
"TestSuite",
},
init = function()
vim.keymap.set("n", "<leader>ts", "<cmd>TestSuite<cr>")
vim.keymap.set("n", "<leader>tf", "<cmd>TestFile<cr>")
vim.keymap.set("n", "<leader>te", "<cmd>TestEdit<cr>")
vim.keymap.set("n", "<leader>tn", "<cmd>TestNearest<cr>")
vim.keymap.set("n", "<leader>tl", "<cmd>TestLast<cr>")
vim.keymap.set("n", "<leader>tv", "<cmd>TestVisit<cr>")
vim.keymap.set("n", "<leader>ti", "<cmd>TestInfo<cr>")
end,
config = true,
otps = {
termOpts = {
direction = "horizontal",
keep_one = true,
},
},
}