diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua index 359081a..6bff99b 100644 --- a/lua/config/keymaping.lua +++ b/lua/config/keymaping.lua @@ -39,6 +39,9 @@ map("n", "", "BufferPrevious", { desc = "Previous tab" }) -- dap map("n", "bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" }) +map("n", "", dap.step_into, { desc = "Step into" }) +map("n", "", dap.step_over, { desc = "Step over" }) +map("n", "", dap.continue, { desc = "Continue" }) -- nvterm map("n", "t", function() diff --git a/lua/config/menu.lua b/lua/config/menu.lua index e644761..9e19e71 100644 --- a/lua/config/menu.lua +++ b/lua/config/menu.lua @@ -1,16 +1,62 @@ local gitsigns = require("gitsigns") local dap = require("dap") +local dapui = require("dapui") return { { - name = " Toggle breakpoint", - cmd = dap.toggle_breakpoint, - rtext = "bb", - }, + name = " Debug", + hl = "Exblue", + items = { + { + name = " Toggle breakpoint", + cmd = dap.toggle_breakpoint, + rtxt = "bb", + }, - { - name = " Run debug", - cmd = dap.continue, + { + name = " Run debug", + cmd = dap.continue, + }, + + { + name = "󰫧 Eval", + cmd = dapui.eval, + }, + + { + name = " Stack", + cmd = function() + require("dapui").float_element("stacks") + end, + }, + + { name = "separator" }, + + { + name = "󰆹 Step into", + cmd = dap.step_into, + rtxt = "", + }, + + { + name = " Step over", + cmd = dap.step_over, + rtxt = "", + }, + + { + name = " Continue", + cmd = dap.continue, + rtxt = "", + }, + + { name = "separator" }, + + { + name = "󰮂 Toggle UI", + cmd = require("dapui").toggle, + }, + }, }, { name = "separator" }, diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua index 9db4545..db5e789 100644 --- a/lua/plugins/dap.lua +++ b/lua/plugins/dap.lua @@ -10,18 +10,18 @@ return { config = function() local dap, dapui = require("dap"), require("dapui") - dap.listeners.before.attach.dapui_config = function() - dapui.open() - end - dap.listeners.before.launch.dapui_config = function() - dapui.open() - end - dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() - end - dap.listeners.before.event_exited.dapui_config = function() - dapui.close() - end + -- dap.listeners.before.attach.dapui_config = function() + -- dapui.open() + -- end + -- dap.listeners.before.launch.dapui_config = function() + -- dapui.open() + -- end + -- dap.listeners.before.event_terminated.dapui_config = function() + -- dapui.close() + -- end + -- dap.listeners.before.event_exited.dapui_config = function() + -- dapui.close() + -- end fn.sign_define("DapBreakpoint", { text = "", texthl = "red", linehl = "", numhl = "" })