DAP UI: Toggle UI open/close with F4

This commit is contained in:
Marco 2024-12-09 12:22:52 +01:00
parent a029b05a99
commit be989b0247

View File

@ -9,10 +9,19 @@ dap.listeners.before.event_terminated["dapui_config"] = function()
--dapui.close() --dapui.close()
end end
dap.listeners.before.event_exited["dapui_config"] = function() dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close() --dapui.close()
end end
vim.keymap.set('n', '<F4>', function() dapui.close() end) local open = false
vim.keymap.set('n', '<F4>', function()
if open then
open = false
dapui.close()
else
open = true
dapui.open()
end
end)
vim.keymap.set('n', '<M-k>', function() dapui.eval() end) vim.keymap.set('n', '<M-k>', function() dapui.eval() end)
vim.api.nvim_set_hl(0, 'DapLogPoint', { ctermbg = 0, fg = '#61afef', bg = '#31353f' }) vim.api.nvim_set_hl(0, 'DapLogPoint', { ctermbg = 0, fg = '#61afef', bg = '#31353f' })