--- @type LazyPluginSpec return { "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio", }, config = function() local dap = require("dap") local dapui = require("dapui") dap.adapters["pwa-node"] = { type = "server", host = "localhost", port = "8123", executable = { command = "js-debug-adapter", }, } dap.configurations.javascript = { { name = "Attach to process (global nvim)", type = "pwa-node", request = "attach", port = 9229, }, } dap.configurations.typescript = { { name = "Attach to process (global nvim)", type = "pwa-node", request = "attach", port = 9229, }, } 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 dapui.setup() vim.keymap.set("n", "tb", "DapToggleBreakpoint", { silent = true, desc = "Toggle breakpoint" }) vim.keymap.set("n", "tc", "DapContinue", { silent = true, desc = "Continue debugger" }) end, }