diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 2226d96..753cb0c 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -24,28 +24,59 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', }, - keys = function(_, keys) - local dap = require 'dap' - local dapui = require 'dapui' - return { - -- Basic debugging keymaps, feel free to change to your liking! - { '', dap.continue, desc = 'Debug: Start/Continue' }, - { '', dap.step_into, desc = 'Debug: Step Into' }, - { '', dap.step_over, desc = 'Debug: Step Over' }, - { '', dap.step_out, desc = 'Debug: Step Out' }, - { 'b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' }, - { - 'B', - function() - dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end, - desc = 'Debug: Set Breakpoint', - }, - -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. - { '', dapui.toggle, desc = 'Debug: See last session result.' }, - unpack(keys), - } - end, + keys = { + -- Basic debugging keymaps, feel free to change to your liking! + { + '', + function() + require('dap').continue() + end, + desc = 'Debug: Start/Continue', + }, + { + '', + function() + require('dap').step_into() + end, + desc = 'Debug: Step Into', + }, + { + '', + function() + require('dap').step_over() + end, + desc = 'Debug: Step Over', + }, + { + '', + function() + require('dap').step_out() + end, + desc = 'Debug: Step Out', + }, + { + 'b', + function() + require('dap').toggle_breakpoint() + end, + desc = 'Debug: Toggle Breakpoint', + }, + { + 'B', + function() + require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') + end, + desc = 'Debug: Set Breakpoint', + }, + -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. + { + '', + function() + require('dapui').toggle() + end, + desc = 'Debug: See last session result.', + }, + }, config = function() local dap = require 'dap' local dapui = require 'dapui'