---@type LazySpec return { { "mfussenegger/nvim-dap", dependencies = { "rcarriga/nvim-dap-ui", { "theHamsta/nvim-dap-virtual-text", config = true }, { "rcarriga/nvim-dap-ui", config = true }, "nvim-neotest/nvim-nio", }, event = "VeryLazy", keys = { { [[\b]], ":DapToggleBreakpoint" }, { [[\c]], ":DapContinue" }, { [[\x]], ":DapTerminate" }, { [[\o]], ":DapStepOver" }, { [[\O]], ":DapStepOut" }, }, config = function() vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) local icons = { Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, Breakpoint = " ", BreakpointCondition = " ", BreakpointRejected = { " ", "DiagnosticError" }, LogPoint = ".>", } for name, sign in pairs(icons) do sign = type(sign) == "table" and sign or { sign } vim.fn.sign_define( "Dap" .. name, { text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] } ) end local dap = require("dap") local dapui = require("dapui") 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, }, }