nvim/lua/user/dap.lua

64 lines
1.4 KiB
Lua
Raw Normal View History

2022-10-12 22:07:20 -04:00
local dap_status_ok, dap = pcall(require, "dap")
if not dap_status_ok then
return
end
local dap_ui_status_ok, dapui = pcall(require, "dapui")
if not dap_ui_status_ok then
return
end
local dap_install_status_ok, dap_install = pcall(require, "dap-install")
if not dap_install_status_ok then
return
end
dap_install.setup {}
dap_install.config("python", {})
-- add other configs here
dapui.setup {
sidebar = {
elements = {
{
id = "scopes",
size = 0.25, -- Can be float or integer > 1
},
{ id = "breakpoints", size = 0.25 },
},
size = 40,
position = "right", -- Can be "left", "right", "top", "bottom"
},
tray = {
elements = {},
},
}
2022-10-16 14:18:21 -04:00
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
2022-10-12 22:07:20 -04:00
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
2022-10-16 14:18:21 -04:00
local codelldb_path = "/usr/lib/codelldb/adapter/codelldb"
local liblldb_path = "/usr/lib/codelldb/adapter/libcodelldb.so"
dap.adapters.codelldb = {
type = 'server',
host = '127.0.0.1',
port = "13000",
executable = {
command = codelldb_path,
args = {"--liblldb", liblldb_path, "--port", "13000"},
}
}