local dap = require('dap') -- -- python -- dap.adapters.python = { type = 'executable'; command = 'python'; args = { '-m', 'debugpy.adapter' }; } dap.configurations.python = { { type = 'python'; request = 'launch'; name = "Launch file"; program = "${file}"; pythonPath = function() local cwd = vim.fn.getcwd() if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then return cwd .. '/venv/bin/python' elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then return cwd .. '/.venv/bin/python' else return '/usr/bin/python' end end; }, } -- -- C -- dap.adapters.lldb = { type = 'executable', command = '/usr/bin/lldb-vscode', name = "lldb" } dap.configurations.c = { { 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, }, }