From 59d9b95eb92c5a871e5eddd41fad98d4ec9231ad Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sat, 13 Aug 2022 19:18:29 +0200 Subject: [PATCH] add cpp config and fix adapter --- lua/setup/my_dap.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lua/setup/my_dap.lua b/lua/setup/my_dap.lua index fda0de0..6318265 100644 --- a/lua/setup/my_dap.lua +++ b/lua/setup/my_dap.lua @@ -87,14 +87,26 @@ dap.adapters.codelldb = { port = "${port}", executable = { -- CHANGE THIS to your path! - command = '/absolute/path/to/codelldb/extension/adapter/codelldb', + command = masonpath .. '/bin/codelldb.cmd', args = { '--port', '${port}' }, -- On windows you may have to uncomment this: - -- detached = false, + detached = false, } } +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, + }, +} -- EXTENSIONS