diff --git a/init.lua b/init.lua index 2546c17..f808759 100644 --- a/init.lua +++ b/init.lua @@ -44,34 +44,10 @@ neogit.setup({ }) local dap, dapui = require("dap"), require("dapui") dap.adapters.lldb = { - type = "executable", - command = deps.lldb_path .. "/bin/lldb-vscode", - name = "lldb", + type = "executable", + command = deps.lldb_path .. "/bin/lldb-vscode", + name = "lldb" } -local lldb = { - name = "Launch lldb", - type = "lldb", -- matches the adapter - request = "launch", -- could also attach to a currently running process - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", - "file") - end, - cwd = "$${workspaceFolder}", - stopOnEntry = false, - args = {}, - console = internalConsole, - runInTerminal = true -} - -dap.configurations.rust = { - lldb -- different debuggers or more configurations can be used here -} ---[[ local opts = { - dap = { - adapter = require("rust-tools.dap").get_codelldb_adapter("${pkgs.lldb}/bin/lldb-vscode", "${pkgs.lldb.lib}/lib/liblldb.so"), - }, - } - require("rust-tools").setup { opts } ]] local dap_breakpoint = { error = { text = "🟥", @@ -93,6 +69,9 @@ local dap_breakpoint = { } } +vim.keymap.set('n', 'dk', function() dap.continue() end) +vim.keymap.set('n', 'dl', function() dap.run_last() end) +vim.keymap.set('n', 'b', function() dap.toggle_breakpoint() end) vim.fn.sign_define("DapBreakpoint", dap_breakpoint.error) vim.fn.sign_define("DapStopped", dap_breakpoint.stopped) vim.fn.sign_define("DapBreakpointRejected", dap_breakpoint.rejected)