return { { 'mfussenegger/nvim-dap', dependencies = { 'rcarriga/nvim-dap-ui', }, keys = { { '', function() require('dap').step_over() end }, { '', function() require('dap').step_into() end }, { '', function() require('dap').step_out() end }, { '', function() require('dap').continue({}) end }, { '', function() require('dap').toggle_breakpoint() end }, { 'DD', function() require('dapui').toggle() end }, { 'DE', function() vim.ui.input({ prompt = 'DAP Evalulate expression: ' }, function(input) require('dapui').eval(input) end) end, }, }, opts = { php = { -- {{{ adapter = { type = 'executable', command = 'node', args = { vim.env.HOME .. '/.local/share/nvim/lazy/vscode-php-debug/out/phpDebug.js' }, }, confs = { { type = 'php', request = 'launch', name = 'Listen for Xdebug', port = 9000, }, }, }, -- }}} }, config = function(_plug, opts) -- signs - move to colorsheme? {{{ vim.fn.sign_define('DapBreakpoint', { text = '⦿', texthl = 'DiagnosticSignError', linehl = '', numhl = '' }) vim.fn.sign_define('DapBreakpointCondition', { text = '✪', texthl = 'DiagnosticSignError', linehl = '', numhl = '' }) vim.fn.sign_define('DapLogPoint', { text = '󱂅', texthl = '', linehl = '', numhl = '' }) vim.fn.sign_define('DapStopped', { text = '', texthl = 'DiagnosticSignOk', linehl = '', numhl = '' }) vim.fn.sign_define('DapBreakpointRejected', { text = '🛑', texthl = '', linehl = '', numhl = '' }) --- }}} local dap = require('dap') for lang, opt in pairs(opts) do dap.configurations[lang] = opt.confs dap.adapters[lang] = opt.adapter end local dapui = require('dapui') 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 end, }, { 'xdebug/vscode-php-debug', build = { 'npm install && npm run build' }, config = false, module = false, lazy = true, }, { 'leoluz/nvim-dap-go', ft = 'go', config = true, }, }