nvimdotfiles/after/plugin/dap/dap-go.lua

15 lines
462 B
Lua
Raw Permalink Normal View History

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