return { { "mfussenegger/nvim-dap", dependencies = { { "leoluz/nvim-dap-go", config = true }, "rcarriga/nvim-dap-ui", { "theHamsta/nvim-dap-virtual-text", config = true }, { "stevearc/overseer.nvim" }, }, keys = { { "dc", "lua require'dap'.continue()", mode = "n", desc = "[D]ebug [C]ontinue" }, { "dj", "lua require'dap'.step_over()", mode = "n", desc = "[D]ebug step over" }, { "di", "lua require'dap'.step_into()", mode = "n", desc = "[D]ebug step [I]nto" }, { "do", "lua require'dap'.step_out()", mode = "n", desc = "[D]ebug step [O]ut" }, { "dl", "lua require'dap'.run_last()", mode = "n", desc = "[D]ebug run [L]ast" }, { "dr", "lua require'dap'.repl.open()", mode = "n", desc = "[D]ebug open [R]epl" }, { "dq", "lua require'dap'.terminate()", mode = "n", desc = "[D]ebug [Q]uit" }, { "db", "lua require'dap'.toggle_breakpoint()", mode = "n", desc = "[D]ebug set [B]reakpoint" }, { "dB", function() vim.ui.input({ prompt = "Breakpoint condition" }, function(cond) if cond then require("dap").set_breakpoint(cond) end end) end, mode = "n", desc = "[D]ebug set conditional [B]reakpoint", }, }, config = function() -- dap.set_log_level("DEBUG") vim.fn.sign_define("DapBreakpoint", { text = "•", texthl = "DiagnosticError", linehl = "", numhl = "" }) vim.fn.sign_define("DapBreakpointCondition", { text = "?", texthl = "DiagnosticError", linehl = "", numhl = "" }) vim.fn.sign_define("DapLogPoint", { text = "⁋", texthl = "", linehl = "", numhl = "" }) vim.fn.sign_define("DapStopped", { text = " ", texthl = "DiagnosticInfo", linehl = "", numhl = "" }) vim.fn.sign_define("DapBreakpointRejected", { text = "X", texthl = "DiagnosticError", linehl = "", numhl = "" }) local dapui = require("dapui") local dap = require("dap") dapui.setup() dap.listeners.after.event_initialized["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 vim.schedule(function() require("dap.ext.vscode").json_decode = require("overseer.json").decode require("dap.ext.vscode").load_launchjs(nil, { node = { "typescript", "javascript" } }) require("overseer").patch_dap(true) end) end, }, }