nvim/after/plugin/dap.lua

29 lines
777 B
Lua

local dap = require('dap')
local dapui = require("dapui")
vim.keymap.set("n", "<leader>dd", function() dap.continue() end)
vim.keymap.set("n", "<leader>db", function() dap.toggle_breakpoint() end)
vim.keymap.set("n", "<leader>dn", function() dap.step_over() end)
require('dap-go').setup()
dapui.setup()
vim.keymap.set("n", "<leader>vd", function() dapui.toggle() end)
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
-- python
require('dap-python').setup('~/.local/share/nvim/.virtualenvs/debugpy/bin/python')