From acd8a470fbf1b677ffe154ae6f2239968ee3dc54 Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Thu, 31 Jul 2025 18:18:31 +0200 Subject: [PATCH] nvim: Connect to remote session with lldb-dap --- _config/nvim/colors.vim | 2 +- _config/nvim/plugin/dap.lua | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/_config/nvim/colors.vim b/_config/nvim/colors.vim index 484efb2..4eeb540 100644 --- a/_config/nvim/colors.vim +++ b/_config/nvim/colors.vim @@ -1,4 +1,4 @@ autocmd colorscheme * highlight EndOfBuffer guibg=NONE ctermbg=NONE autocmd colorscheme * highlight Normal guibg=NONE ctermbg=NONE autocmd colorscheme * highlight NonText guibg=NONE ctermbg=NONE -colorscheme evening +colorscheme desert diff --git a/_config/nvim/plugin/dap.lua b/_config/nvim/plugin/dap.lua index 2479e73..50402cd 100644 --- a/_config/nvim/plugin/dap.lua +++ b/_config/nvim/plugin/dap.lua @@ -3,46 +3,44 @@ local dapui = require("dapui") dapui.setup({}) -dap.adapters.codelldb = { +dap.adapters.lldb = { type = 'server', host = '127.0.0.1', port = "${port}", executable = { - command = '/usr/bin/codelldb', - args = {"--port", "${port}"}, + command = '/usr/bin/lldb-dap', + args = { "--port", "${port}" }, } } dap.configurations.rust = { { - name = "Remote Launch", - type = "codelldb", + name = "Attach to Remote via GDB Remote", + type = "lldb", 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}', + cwd = "${workspaceFolder}", stopOnEntry = false, - }, + -- runInTerminal = true, + + initCommands = { + "gdb-remote localhost:1234", + }, + } } -- dap.configurations.rust = { -- { --- name = "Launch file", +-- name = "Launch File", -- type = "codelldb", -- request = "launch", -- program = function() -- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') -- end, -- cwd = '${workspaceFolder}', +-- runInTerminal = true, -- stopOnEntry = false, -- }, -- }