37 lines
1005 B
Lua
37 lines
1005 B
Lua
|
return {
|
||
|
"mfussenegger/nvim-dap",
|
||
|
dependencies={
|
||
|
{
|
||
|
"rcarriga/nvim-dap-ui",
|
||
|
dependencies={
|
||
|
"nvim-neotest/nvim-nio"
|
||
|
}},
|
||
|
{
|
||
|
"mfussenegger/nvim-dap-python"
|
||
|
}
|
||
|
},
|
||
|
config=function ()
|
||
|
local dap = require("dap")
|
||
|
local dapui = require("dapui")
|
||
|
|
||
|
vim.keymap.set("n", "<leader>dt", dap.toggle_breakpoint, {})
|
||
|
vim.keymap.set("n", "<leader>dc", dap.continue, {})
|
||
|
|
||
|
require("dapui").setup()
|
||
|
require("dap-python").setup("~/.virtualenvs/debugpy/bin/python")
|
||
|
|
||
|
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
|
||
|
end
|
||
|
}
|