2024-02-23 22:13:21 +00:00
|
|
|
local dapgo = require('dap-go')
|
|
|
|
|
|
|
|
dapgo.setup()
|
|
|
|
vim.keymap.set('n', '<leader>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
|