nvimdotfiles/after/plugin/dap/dap-c.lua.WITH_GDB
2024-04-06 22:00:26 +02:00

26 lines
530 B
Plaintext

local dap = require("dap")
dap.adapters.gdb = {
type = "executable",
command = "gdb",
args = { "-i", "dap" }
}
dap.configurations.c = {
{
name = "Launch",
type = "gdb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = {},
cwd = "${workspaceFolder}",
stopAtBeginningOfMainSubprogram = false,
console = 'integratedTerminal',
},
}
dap.configurations.rust = dap.configurations.c
dap.configurations.cpp = dap.configurations.c