feat(nvim): use nvim-dap-view for the dap ui
Is less instrusive than nvim-dap-ui
This commit is contained in:
parent
19ab197c23
commit
ea08474d7b
1 changed files with 27 additions and 9 deletions
|
@ -1,15 +1,29 @@
|
|||
local prefix = "<leader>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", "<cmd>DapViewToggle<cr>", desc = "Dap UI" },
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
|
@ -22,12 +36,16 @@ return {
|
|||
{ "<S-F2>", 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 = {
|
||||
{ "<leader>tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" },
|
||||
{ "<leader>tD", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue