40 lines
822 B
Lua
40 lines
822 B
Lua
return {
|
|
'nvim-neotest/neotest',
|
|
dependencies = {
|
|
'nvim-lua/plenary.nvim',
|
|
'nvim-treesitter/nvim-treesitter',
|
|
'antoinemadec/FixCursorHold.nvim',
|
|
'nvim-neotest/neotest-python',
|
|
},
|
|
config = function()
|
|
local pythonVenv = require('utils.python_venv')
|
|
require('neotest').setup({
|
|
adapters = {
|
|
require('neotest-python')({
|
|
dap = {
|
|
justMyCode = false,
|
|
},
|
|
runner = 'pytest',
|
|
python = pythonVenv.getPythonEnv,
|
|
}),
|
|
},
|
|
})
|
|
end,
|
|
keys = {
|
|
{
|
|
'<F3>',
|
|
function()
|
|
require('neotest').run.run()
|
|
end,
|
|
desc = 'Run nearest test',
|
|
},
|
|
{
|
|
'<S-F3>',
|
|
function()
|
|
require('neotest').run.run({ strategy = 'dap' })
|
|
end,
|
|
desc = 'Run nearest test',
|
|
},
|
|
},
|
|
}
|