vim.pack.add({ "https://github.com/nvim-neotest/neotest", "https://github.com/antoinemadec/FixCursorHold.nvim", "https://github.com/rcasia/neotest-java", "https://github.com/marilari88/neotest-vitest", "https://github.com/nvim-neotest/neotest-go", }) local neotest_ns = vim.api.nvim_create_namespace("neotest") vim.diagnostic.config({ virtual_text = { format = function(diagnostic) local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") return message end, }, }, neotest_ns) require("neotest").setup({ adapters = { require("neotest-vitest"), require("neotest-java"), require("neotest-go"), }, }) vim.keymap.set("n", "tr", function() require("neotest").run.run({ suite = false }) end) vim.keymap.set("n", "ts", function() require("neotest").run.run({ suite = true }) end) vim.keymap.set("n", "tf", function() require("neotest").run.run(vim.fn.expand("%")) end) vim.keymap.set("n", "tv", function() require("neotest").summary.toggle() end) vim.keymap.set("n", "to", function() require("neotest").output.open() end)