diff --git a/_config/nvim/plugin/dap.lua b/_config/nvim/plugin/dap.lua index 3dffc65..2479e73 100644 --- a/_config/nvim/plugin/dap.lua +++ b/_config/nvim/plugin/dap.lua @@ -5,27 +5,48 @@ dapui.setup({}) dap.adapters.codelldb = { type = 'server', + host = '127.0.0.1', port = "${port}", executable = { - -- Change this to your path! command = '/usr/bin/codelldb', args = {"--port", "${port}"}, } } -dap.configurations.rust= { +dap.configurations.rust = { { - name = "Launch file", + name = "Remote Launch", type = "codelldb", request = "launch", + args = { + "platform select remote-linux", -- For example: 'remote-linux', 'remote-macosx', 'remote-android', etc. + "platform connect connect://localhost:13000", + }, program = function() return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') end, + attachCommands = { + "platform select remote-linux", + "platform connect connect://localhost:13000", + }, cwd = '${workspaceFolder}', stopOnEntry = false, }, } +-- dap.configurations.rust = { +-- { +-- name = "Launch file", +-- type = "codelldb", +-- request = "launch", +-- program = function() +-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') +-- end, +-- cwd = '${workspaceFolder}', +-- stopOnEntry = false, +-- }, +-- } + vim.keymap.set('n', 'dc', function() dap.continue() end) vim.keymap.set('n', '', function() dap.step_over() end) vim.keymap.set('n', '', function() dap.step_into() end)