summaryrefslogtreecommitdiff
path: root/lua/kickstart
diff options
context:
space:
mode:
Diffstat (limited to 'lua/kickstart')
-rw-r--r--lua/kickstart/plugins/debug.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua
index 0b68c43..deeda56 100644
--- a/lua/kickstart/plugins/debug.lua
+++ b/lua/kickstart/plugins/debug.lua
@@ -9,7 +9,6 @@
return {
-- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap',
-
-- NOTE: And you can specify dependencies as well
dependencies = {
-- Creates a beautiful debugger UI
@@ -22,7 +21,6 @@ return {
-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
-
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
@@ -32,6 +30,10 @@ return {
-- reasonable debug configurations
automatic_setup = true,
+ -- You can provide additional configuration to the handlers,
+ -- see mason-nvim-dap README for more information
+ handlers = {},
+
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
@@ -40,10 +42,6 @@ return {
},
}
- -- You can provide additional configuration to the handlers,
- -- see mason-nvim-dap README for more information
- require('mason-nvim-dap').setup_handlers()
-
-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue)
vim.keymap.set('n', '<F1>', dap.step_into)
@@ -71,10 +69,13 @@ return {
step_back = 'b',
run_last = '▶▶',
terminate = '⏹',
+ disconnect = "⏏",
},
},
}
-
+ -- toggle to see last session result. Without this ,you can't see session output in case of unhandled exception.
+ vim.keymap.set("n", "<F7>", 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