From abfc8fb889cf4bb9890ae4d9d63901c48c9b9661 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sun, 7 May 2023 21:25:01 +0200 Subject: Add a key to disconnect dap including it's terminal --- lua/user/keys.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 8e16d03..b128a60 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -364,18 +364,19 @@ map("n", "ds", function() end) -- Set breakpoints, get variable values, step into/out of functions, etc. -map("n", "dl", require("dap.ui.widgets").hover) map("n", "dc", dap.continue) map("n", "dC", dap.close) map("n", "dt", dap.terminate) -map("n", "db", dap.toggle_breakpoint) +map("n", "dd", function() dap.disconnect({ terminateDebuggee = true }) end) map("n", "dn", dap.step_over) map("n", "di", dap.step_into) map("n", "do", dap.step_out) +map("n", "db", dap.toggle_breakpoint) map("n", "dB", function() dap.clear_breakpoints() require("notify")("Breakpoints cleared", "warn") end) +map("n", "dl", require("dap.ui.widgets").hover) --vim.keymap.set("n", "B", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))") --vim.keymap.set("v", "B", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))") --vim.keymap.set("n", "lp", ":lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))") -- cgit v1.2.3