diff --git a/after/plugin/dap/dap-go.lua b/after/plugin/dap/dap-go.lua index c95207a..54190b3 100644 --- a/after/plugin/dap/dap-go.lua +++ b/after/plugin/dap/dap-go.lua @@ -1,2 +1,14 @@ -require('dap-go').setup() -vim.keymap.set('n', 'td', function() require('dap-go').debug_test() end) +local dapgo = require('dap-go') + +dapgo.setup() +vim.keymap.set('n', 'td', function() dapgo.debug_test() end) + + +local dap = require("dap") +-- we replace the configuration that falls out of dap-go with values that work for me +for key, value in pairs(dap.configurations.go) do + if value.name == "Debug" or value.name == "Debug (Arguments)" then + dap.configurations.go[key].mode = "debug" + dap.configurations.go[key].program = "${workspaceFolder}" + end +end