diff --git a/.config/nvim/lua/plugins/extras/dap/core-extended.lua b/.config/nvim/lua/plugins/extras/dap/core-extended.lua index b4e79b6f..2ca8f789 100644 --- a/.config/nvim/lua/plugins/extras/dap/core-extended.lua +++ b/.config/nvim/lua/plugins/extras/dap/core-extended.lua @@ -1,15 +1,29 @@ +local prefix = "d" + return { { import = "lazyvim.plugins.extras.dap.core" }, { "mfussenegger/nvim-dap", - opts = { - defaults = { - fallback = { - external_terminal = { - command = "/usr/bin/kitty", - args = { "--class", "kitty-dap", "--hold", "--detach", "nvim-dap", "-c", "DAP" }, - }, - }, + dependencies = { + "igorlfs/nvim-dap-view", + opts = {}, + config = function(_, opts) + local dap = require("dap") + dap.listeners.before.attach.dapui_config = function() + vim.cmd("DapViewOpen") + end + dap.listeners.before.launch.dapui_config = function() + vim.cmd("DapViewOpen") + end + dap.listeners.before.event_terminated.dapui_config = function() + vim.cmd("DapViewClose") + end + dap.listeners.before.event_exited.dapui_config = function() + vim.cmd("DapViewClose") + end + end, + keys = { + { prefix .. "u", "DapViewToggle", desc = "Dap UI" }, }, }, -- stylua: ignore @@ -22,12 +36,16 @@ return { { "", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, }, }, + { + "rcarriga/nvim-dap-ui", + enabled = false, + }, { "nvim-neotest/neotest", optional = true, -- stylua: ignore keys = { - { "tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" }, + { "tD", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last" }, }, }, }