return { { 'nvim-neotest/neotest', dependencies = { 'nvim-lua/plenary.nvim', 'antoinemadec/FixCursorHold.nvim', 'nvim-neotest/neotest-python', 'nvim-treesitter/nvim-treesitter', }, config = function() local neotest = require 'neotest' neotest.setup { adapters = { require 'neotest-python' { dap = { justMyCode = false }, -- args = {}, -- runner = 'pytest', }, }, } -- Keymaps vim.keymap.set('n', 'tr', function() neotest.run.run() end, { desc = 'Run nearest test' }) vim.keymap.set('n', 'tf', function() neotest.run.run(vim.fn.expand '%') end, { desc = 'Run tests in file' }) vim.keymap.set('n', 'td', function() neotest.run.run { strategy = 'dap' } end, { desc = 'Debug nearest test' }) vim.keymap.set('n', 'ts', function() neotest.summary.toggle() end, { desc = 'Toggle test summary' }) vim.keymap.set('n', 'to', function() neotest.output.open { enter = true } end, { desc = 'Show test output' }) vim.keymap.set('n', 'tO', function() neotest.output_panel.toggle() end, { desc = 'Toggle output panel' }) vim.keymap.set('n', 'tw', function() neotest.watch.toggle(vim.fn.expand '%') end, { desc = 'Toggle watch for file' }) end, }, }