15 lines
462 B
Lua
15 lines
462 B
Lua
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
|