local M = { "mfussenegger/nvim-dap", dependencies = { { "rcarriga/nvim-dap-ui" }, { "theHamsta/nvim-dap-virtual-text", config = function() require("nvim-dap-virtual-text").setup({ commented = true, }) end, }, { "leoluz/nvim-dap-go", config = function() require("dap-go").setup() end, keys = { { "y", ":lua require('dap-go').debug_test()" }, }, }, }, } function M.init() local silent = { silent = true } vim.fn.sign_define("DapStopped", { text = "⇒", texthl = "", linehl = "debugPC", numhl = "" }) vim.fn.sign_define("DapBreakpoint", { text = "🧘", texthl = "", linehl = "debugPC", numhl = "" }) vim.keymap.set("n", "DD", ":lua require 'dap'.toggle_breakpoint()", silent) vim.keymap.set("n", "Dc", ":lua require 'dap'.continue()", silent) vim.keymap.set("n", "Di", ":lua require 'dap'.step_into()", silent) vim.keymap.set("n", "Do", ":lua require 'dap'.step_over()", silent) vim.keymap.set("n", "DO", ":lua require 'dap'.step_out()", silent) vim.keymap.set("n", "Dr", ":lua require 'dap'.repl.toggle({height = 5})", silent) vim.keymap.set("n", "Dh", ":lua require 'dap.ui.widgets'.hover()", silent) end return M