aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-05-05 23:09:00 +0200
committersrdusr <trevorgray@srdusr.com>2023-05-05 23:09:00 +0200
commite2d8386915af4517ecc856799851d5f1bd866ba9 (patch)
tree15d47900b23a98f79c18cee047d94d40142e8105 /lua/plugins
parent7684755aed98983c2bd3e342d426b5a3634269a3 (diff)
downloaddotfiles-e2d8386915af4517ecc856799851d5f1bd866ba9.tar.gz
dotfiles-e2d8386915af4517ecc856799851d5f1bd866ba9.zip
Configure codelldb and set it as type to use
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/dap.lua55
1 files changed, 34 insertions, 21 deletions
diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua
index 03e37e5..c4aec62 100644
--- a/lua/plugins/dap.lua
+++ b/lua/plugins/dap.lua
@@ -47,10 +47,12 @@ dap.adapters.cppdbg = {
dap.adapters.codelldb = {
type = 'server',
- port = "${port}",
+ port = '${port}',
executable = {
- command = os.getenv("HOME") .. '/apps/codelldb/extension/adapter/codelldb',
- args = {"--port", "${port}"},
+ --command = os.getenv("HOME") .. '/apps/codelldb/extension/adapter/codelldb',
+ --command = vim.env.HOME .. "/.vscode-oss/extensions/vadimcn.vscode-lldb-1.9.0-universal/adapter/codelldb",
+ command = os.getenv("HOME") .. "/.vscode-oss/extensions/vadimcn.vscode-lldb-1.9.0-universal/adapter/codelldb",
+ args = {'--port', '${port}'},
}
}
@@ -59,32 +61,34 @@ dap.adapters.lldb = {
command = '/usr/bin/lldb-vscode',
name = "lldb"
}
-
dap.configurations.cpp = {
{
name = "Launch file",
- type = "cppdbg",
- --request = "launch",
- request = "Attach",
- processId = function()
- return tonumber(vim.fn.input({ prompt = "Pid: "}))
- end,
+ --type = "cppdbg",
+ type = "codelldb",
+ request = "launch",
+ --request = "Attach",
+ --processId = function()
+ -- return tonumber(vim.fn.input({ prompt = "Pid: "}))
+ --end,
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
stopAtEntry = true,
- MIMode = 'gdb',
+ args = {},
+ runInTerminal = false,
+ --MIMode = 'gdb',
--miDebuggerServerAddress = 'localhost:1234',
- miDebuggerPath = 'gdb-oneapi',
+ --miDebuggerPath = 'gdb-oneapi',
--miDebuggerPath = '/usr/bin/gdb',
- externalConsole = true,
- setupCommands = {
- {
- text = '-enable-pretty-printing',
- description = 'enable pretty printing',
- ignoreFailures = false
- }
- },
+ --externalConsole = true,
+ --setupCommands = {
+ -- {
+ -- text = '-enable-pretty-printing',
+ -- description = 'enable pretty printing',
+ -- ignoreFailures = false
+ -- }
+ --},
cwd = '${workspaceFolder}',
},
}
@@ -228,7 +232,16 @@ vim.fn.sign_define("DapBreakpointRejected", { text = '!>', texthl = 'DiagnosticE
vim.fn.sign_define("DapBreakpointCondition", { text = '?>', texthl = 'DiagnosticInfo', numhl = 'DiagnosticInfo' })
vim.fn.sign_define("DapLogPoint", { text = '.>', texthl = 'DiagnosticInfo', numhl = 'DiagnosticInfo' })
+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
+
-- options
dap.defaults.fallback.focus_terminal = false
dap.defaults.fallback.terminal_win_cmd = '10split new'
-