dotfiles/.config/nvim/lua/plugins/dap.lua

48 lines
1.2 KiB
Lua
Raw Normal View History

2024-03-03 16:58:37 +00:00
local dap = require("dap")
dap.adapters.lldb = {
2024-03-17 12:32:47 +00:00
type = 'server',
port = "${port}",
executable = {
command = '/Users/afonso/.local/share/nvim/mason/bin/codelldb',
args = { "--port", "${port}" },
}
}
dap.adapters.codelldb = {
type = 'server',
host = '127.0.0.1',
port = 13000
2024-03-03 16:58:37 +00:00
}
dap.configurations.c = {
{
2024-03-17 12:32:47 +00:00
name = "Manually start codelldb",
2024-03-03 16:58:37 +00:00
type = "codelldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = function()
local args = vim.fn.input('Arguments: ')
return args ~= '' and { args } or nil
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
2024-03-17 12:32:47 +00:00
{
name = "Auto start codelldb",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = function()
local args = vim.fn.input('Arguments: ')
return args ~= '' and { args } or nil
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
},
2024-03-03 16:58:37 +00:00
}