1
0
Fork 0
dotfiles/dot_config/nvim/lua/plugins/dap/lldb.lua

32 lines
793 B
Lua
Raw Permalink Normal View History

2022-04-13 21:54:22 +02:00
local dap = require('dap')
local function init()
dap.adapters.lldb = {
type = 'executable',
command = '/usr/bin/lldb-vscode',
name = 'lldb'
}
dap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
runInTerminal = false,
},
}
dap.configurations.c = dap.configurations.cpp
-- dap.configurations.rust = dap.configurations.cpp
-- dap.configurations.rust[1].program = function()
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug/', 'file')
-- end
end
return {
init = init
}