nvim: add neotest
This commit is contained in:
@ -105,6 +105,38 @@ vim.keymap.set("n", "]d", function()
|
||||
vim.lsp.diagnostic.goto_next()
|
||||
end)
|
||||
|
||||
-- neotest
|
||||
vim.keymap.set("n", "na", function()
|
||||
require("neotest").run.attach()
|
||||
end)
|
||||
vim.keymap.set("n", "nf", function()
|
||||
require("neotest").run.run(vim.fn.expand("%"))
|
||||
end)
|
||||
vim.keymap.set("n", "nF", function()
|
||||
require("neotest").run.run({ vim.fn.expand("%"), strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "nl", function()
|
||||
require("neotest").run.run_last()
|
||||
end)
|
||||
vim.keymap.set("n", "nL", function()
|
||||
require("neotest").run.run_last({ strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "nn", function()
|
||||
require("neotest").run.run()
|
||||
end)
|
||||
vim.keymap.set("n", "nN", function()
|
||||
require("neotest").run.run({ strategy = "dap" })
|
||||
end)
|
||||
vim.keymap.set("n", "no", function()
|
||||
require("neotest").output.open({ enter = true })
|
||||
end)
|
||||
vim.keymap.set("n", "nS", function()
|
||||
require("neotest").run.stop()
|
||||
end)
|
||||
vim.keymap.set("n", "ns", function()
|
||||
require("neotest").summary.toggle()
|
||||
end)
|
||||
|
||||
-- telekasten
|
||||
vim.keymap.set("n", "<leader>z", function()
|
||||
require("telekasten").panel()
|
||||
|
||||
@ -110,6 +110,18 @@ require("packer").startup(function()
|
||||
end,
|
||||
})
|
||||
|
||||
-- neotest
|
||||
use({
|
||||
"nvim-neotest/neotest",
|
||||
config = function()
|
||||
require("plugins.neotest")
|
||||
end,
|
||||
requires = {
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-neotest/neotest-python",
|
||||
},
|
||||
})
|
||||
|
||||
-- fugitive
|
||||
use({
|
||||
"tpope/vim-fugitive",
|
||||
|
||||
7
.config/nvim/lua/plugins/neotest.lua
Normal file
7
.config/nvim/lua/plugins/neotest.lua
Normal file
@ -0,0 +1,7 @@
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
runner = "pytest",
|
||||
}),
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user