return { "mfussenegger/nvim-dap", dependencies = { "rcarriga/nvim-dap-ui", }, config = function() -- Setup -- local dap = require("dap") local dapui = require("dapui").setup() 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 -- Keybinding -- vim.keymap.set("n", "dt", ":DapToggleBreakpoint") vim.keymap.set("n", "dc", ":DapContinue") vim.keymap.set("n", "dx", ":DapTerminate") vim.keymap.set("n", "do", ":DapStepOver") end, }