Skip to content

Commit

Permalink
Fix dap close
Browse files Browse the repository at this point in the history
  • Loading branch information
dparo committed Jan 6, 2025
1 parent 89f2a23 commit 5eb0686
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions roles/neovim/files/lua/plugins/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ return {
-- dap.listeners.after.event_initialized["dapui_config"] = function()
-- dapui.open()
-- end
dap.listeners.before.attach["dapui_config"] = function()
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch["dapui_config"] = function()
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
require("nvim-dap-virtual-text/virtual_text").clear_virtual_text()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
require("nvim-dap-virtual-text/virtual_text").clear_virtual_text()
end
Expand Down Expand Up @@ -272,11 +272,15 @@ return {
vim.keymap.set("n", "<F5>", dap.continue)
vim.keymap.set("n", "<S-F5>", function()
dap.terminate()
dapui.close()
require("nvim-dap-virtual-text/virtual_text").clear_virtual_text()
end)

-- <S-F5>
vim.keymap.set("n", "<F17>", function()
dap.terminate()
dapui.close()
require("nvim-dap-virtual-text/virtual_text").clear_virtual_text()
end)

-- <M-F5>
Expand Down

0 comments on commit 5eb0686

Please sign in to comment.