-- Testing configuration with neotest -- Supports Vitest (TypeScript), pytest (Python), and go test (Go) return { { "nvim-neotest/neotest", dependencies = { "marilari88/neotest-vitest", }, opts = { adapters = { ["neotest-vitest"] = {}, }, }, keys = { -- Run tests { "tt", function() require("neotest").run.run() end, desc = "Run Nearest Test" }, { "tf", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File Tests" }, { "ta", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Tests" }, { "tl", function() require("neotest").run.run_last() end, desc = "Run Last Test" }, { "tS", function() require("neotest").run.stop() end, desc = "Stop Tests" }, -- Debug tests { "td", function() require("neotest").run.run({ strategy = "dap" }) end, desc = "Debug Nearest Test" }, { "tD", function() require("neotest").run.run({ vim.fn.expand("%"), strategy = "dap" }) end, desc = "Debug File Tests" }, -- Watch mode { "tw", function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch (File)" }, { "tW", function() require("neotest").watch.toggle() end, desc = "Toggle Watch (Nearest)" }, -- Output and summary { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, -- Navigation { "[t", function() require("neotest").jump.prev({ status = "failed" }) end, desc = "Prev Failed Test" }, { "]t", function() require("neotest").jump.next({ status = "failed" }) end, desc = "Next Failed Test" }, }, }, -- Which-key group label { "folke/which-key.nvim", opts = { spec = { { "t", group = "test" }, }, }, }, }