---@type LazySpec return { "nvim-neotest/neotest", keys = function() -- stylua: ignore return { { "tn", function() require("neotest").run.run() end }, { "tt", function() require("neotest").run.run(vim.fn.expand "%") end }, { "tS", function() require("neotest").run.stop() end }, { "to", function() require("neotest").output.open() end }, { "ts", function() require("neotest").summary.toggle() end }, { "tw", function() require("neotest").watch.toggle() end }, { "]t", function() require("neotest").jump.next() end }, { "[t", function() require("neotest").jump.prev() end }, { "]T", function() require("neotest").jump.next { status = "failed" } end }, { "[T", function() require("neotest").jump.prev { status = "failed" } end }, } end, dependencies = { "nvim-neotest/nvim-nio", "fredrikaverpil/neotest-golang", "nvim-neotest/neotest-plenary", "nvim-treesitter", }, config = function() vim.diagnostic.config({ virtual_text = { format = function(diagnostic) local r, _ = diagnostic.message :gsub("\n", " ") :gsub("\t", " ") :gsub("%s+", " ") :gsub("^%s+", "") return r end, }, }, vim.api.nvim_create_namespace "neotest") ---@type neotest.Config ---@diagnostic disable-next-line: missing-fields require("neotest").setup { adapters = { require "neotest-plenary", require "neotest-golang" { -- go_test_args = { "-count=1", "-timeout=60s" }, testify_enabled = true, }, }, icons = { expanded = "", child_prefix = "", child_indent = "", final_child_prefix = "", non_collapsible = "", collapsed = "", passed = "", running = "", failed = "", unknown = "", }, ---@diagnostic disable-next-line: missing-fields summary = { ---@diagnostic disable-next-line: missing-fields mappings = { expand = { "l", "h", "" }, stop = "s", }, }, } end, }