return { "nvim-neotest/neotest", dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "antoinemadec/FixCursorHold.nvim", "nvim-neotest/nvim-nio", -- Adapters "tovijaeschke/neotest-phpunit", "nvim-neotest/neotest-go", }, config = function() local neotest = require("neotest") local keymap = vim.keymap keymap.set("n", "tr", function() neotest.run.run() end, { desc = "Run neotest on current function" }) keymap.set("n", "tR", function() neotest.run.run_last() end, { desc = "Run neotest on most recent test" }) keymap.set("n", "tS", function() neotest.run.stop() end, { desc = "Stop running tests" }) keymap.set("n", "ta", function() neotest.run.attach() end, { desc = "Attach to the currently running test" }) keymap.set("n", "to", function() neotest.output.open() end, { desc = "Open the output of the test" }) keymap.set("n", "ts", function() neotest.summary.toggle() end, { desc = "Toggle neotest summary pane" }) neotest.setup({ adapters = { require("neotest-phpunit")({ root_files = { "phpunit.xml", "composer.json" }, -- phpunit_cmd = { "docker", "compose", "exec", "fpm", "./vendor/bin/phpunit" }, phpunit_cmd = { "docker", "compose", "exec", "app-fpm", "./vendor/bin/phpunit" }, filter_dirs = { "vendor" }, mapped_docker_dir = "/var/www", append_to_cwd = "/api", }), }, }) end, }