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 {
|
return {
|
||||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
opts = {
|
dependencies = {
|
||||||
defaults = {
|
"igorlfs/nvim-dap-view",
|
||||||
fallback = {
|
opts = {},
|
||||||
external_terminal = {
|
config = function(_, opts)
|
||||||
command = "/usr/bin/kitty",
|
local dap = require("dap")
|
||||||
args = { "--class", "kitty-dap", "--hold", "--detach", "nvim-dap", "-c", "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
|
-- stylua: ignore
|
||||||
|
@ -22,12 +36,16 @@ return {
|
||||||
{ "<S-F2>", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
{ "<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",
|
"nvim-neotest/neotest",
|
||||||
optional = true,
|
optional = true,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
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