return { 'mfussenegger/nvim-dap', dependencies = { 'rcarriga/nvim-dap-ui', 'williamboman/mason.nvim', 'jay-babu/mason-nvim-dap.nvim', -- Add your own debuggers here 'leoluz/nvim-dap-go', }, config = function() local dap = require 'dap' local dapui = require 'dapui' require('mason-nvim-dap').setup { automatic_setup = true, handlers = {}, ensure_installed = { 'delve', }, } vim.keymap.set('n', '', dap.continue) vim.keymap.set('n', '', dap.step_into) vim.keymap.set('n', '', dap.step_over) vim.keymap.set('n', '', dap.step_out) vim.keymap.set('n', 'b', dap.toggle_breakpoint) vim.keymap.set('n', 'B', function() dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') end) dapui.setup { icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, controls = { icons = { pause = '⏸', play = '▶', step_into = '⏎', step_over = '⏭', step_out = '⏮', step_back = 'b', run_last = '▶▶', terminate = '⏹', disconnect = "⏏", }, }, } vim.keymap.set("n", "", dapui.toggle) dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close require('dap-go').setup() end, }