From d5848f9e6b99205d1f1ef8e10115bca581373d88 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 11 Apr 2026 18:38:33 -0600 Subject: [PATCH] fix: help box toggles with ?, add emoji gutter signs with colors --- lua/tiny-debugger/breakpoints.lua | 15 +++++++++++++++ lua/tiny-debugger/mode.lua | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lua/tiny-debugger/breakpoints.lua b/lua/tiny-debugger/breakpoints.lua index 5edd89a..256f162 100644 --- a/lua/tiny-debugger/breakpoints.lua +++ b/lua/tiny-debugger/breakpoints.lua @@ -12,6 +12,21 @@ function M.setup() load_breakpoints_event = { "BufReadPost" }, }) + -- sign highlights + vim.api.nvim_set_hl(0, "DapBreakpoint", { fg = "#e06c75" }) + vim.api.nvim_set_hl(0, "DapBreakpointCondition", { fg = "#e5c07b" }) + vim.api.nvim_set_hl(0, "DapBreakpointRejected", { fg = "#5c6370" }) + vim.api.nvim_set_hl(0, "DapStopped", { fg = "#98c379" }) + vim.api.nvim_set_hl(0, "DapStoppedLine", { bg = "#2e3b2e" }) + vim.api.nvim_set_hl(0, "DapLogPoint", { fg = "#61afef" }) + + -- gutter signs + vim.fn.sign_define("DapBreakpoint", { text = "🔴", texthl = "DapBreakpoint" }) + vim.fn.sign_define("DapBreakpointCondition", { text = "🟡", texthl = "DapBreakpointCondition" }) + vim.fn.sign_define("DapBreakpointRejected", { text = "⭕", texthl = "DapBreakpointRejected" }) + vim.fn.sign_define("DapStopped", { text = "▶️", texthl = "DapStopped", linehl = "DapStoppedLine" }) + vim.fn.sign_define("DapLogPoint", { text = "📝", texthl = "DapLogPoint" }) + -- global mappings — these work outside debug mode local keys = config.opts.keys if keys.breakpoint then diff --git a/lua/tiny-debugger/mode.lua b/lua/tiny-debugger/mode.lua index d158e39..a0b3724 100644 --- a/lua/tiny-debugger/mode.lua +++ b/lua/tiny-debugger/mode.lua @@ -58,7 +58,13 @@ local function setup_default_actions() M.exit() end actions.restart = function() dap.restart() end - actions.help = function() help.open() end + actions.help = function() + if help.is_open() then + help.close() + else + help.open() + end + end actions.watch = function() local expr