Automate UI visibility with nvim-dap listeners
masterYou can automate opening and closing the UI by attaching nvim-dap-ui functions to nvim-dap events. This ensures the UI appears when a debug session starts and disappears when it ends.
local dap, dapui = require("dap"), 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