From 0355316bf7f0f0092351436299f1add163cd4365 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Mon, 1 Jul 2024 08:57:13 +0200 Subject: [PATCH 1/2] feat: use neotest-golang --- lua/pde/go.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/pde/go.lua b/lua/pde/go.lua index ffe402e..d2a2060 100644 --- a/lua/pde/go.lua +++ b/lua/pde/go.lua @@ -115,11 +115,16 @@ return { { "nvim-neotest/neotest", dependencies = { - "nvim-neotest/neotest-go", + { + "fredrikaverpil/neotest-golang", + dependencies = { + "leoluz/nvim-dap-go", + }, + }, }, opts = function(_, opts) vim.list_extend(opts.adapters, { - require "neotest-go", + require "neotest-golang", }) end, }, From e8884464dae96ca953b6aa345804a826f97bebcf Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Mon, 1 Jul 2024 08:59:43 +0200 Subject: [PATCH 2/2] feat: use neotest-command for debugging nearest test --- lua/pde/go.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/pde/go.lua b/lua/pde/go.lua index d2a2060..01c3df9 100644 --- a/lua/pde/go.lua +++ b/lua/pde/go.lua @@ -89,7 +89,7 @@ return { map("n", "lc", "GoCoverage", "Go Test Coverage") map("n", "lt", "GoTest", "Go Test") map("n", "lR", "GoRun", "Go Run") - map("n", "dT", "lua require('dap-go').debug_test()", "Go Debug Test") + map("n", "dT", "lua require('neotest').run.run({ suite = false, strategy = 'dap' })", "Debug nearest test") if not client.server_capabilities.semanticTokensProvider then local semantic = client.config.capabilities.textDocument.semanticTokens