28 lines
601 B
Lua
28 lines
601 B
Lua
local M = {}
|
|
|
|
function M.setup()
|
|
local dap = require('dap')
|
|
dap.adapters.codelldb = {
|
|
type = 'server',
|
|
port = "${port}",
|
|
executable = {
|
|
command = '/home/ubuntu/.local/share/nvim/mason/packages/codelldb/codelldb',
|
|
args = {"--port", "${port}"}
|
|
}
|
|
}
|
|
dap.configurations.cpp = {
|
|
{
|
|
name = "Launch file",
|
|
type = "codelldb",
|
|
request = "launch",
|
|
program = function()
|
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
end,
|
|
cwd = '${workspaceFolder}',
|
|
stopOnEntry = true,
|
|
},
|
|
}
|
|
end
|
|
|
|
return M
|