29 lines
830 B
Lua
29 lines
830 B
Lua
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", "<Leader>dt", ":DapToggleBreakpoint<CR>")
|
|
vim.keymap.set("n", "<Leader>dc", ":DapContinue<CR>")
|
|
vim.keymap.set("n", "<Leader>dx", ":DapTerminate<CR>")
|
|
vim.keymap.set("n", "<Leader>do", ":DapStepOver<CR>")
|
|
end,
|
|
}
|