feat(nvim): kitty terminal added as a fallback for dap; also added mappings for the F keys when debugging

This commit is contained in:
Sergio Laín 2023-10-26 00:46:53 +02:00
parent 3e33817281
commit 2bb62c8dd4
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -0,0 +1,50 @@
return {
"mfussenegger/nvim-dap",
opts = {
defaults = {
fallback = {
external_terminal = {
command = "/usr/bin/kitty",
args = { "--class", "kitty-dap", "--hold", "--detach", "nvim-dap", "-c", "DAP" },
},
},
},
},
keys = {
{
"<F5>",
function()
require("dap").continue()
end,
desc = "Debug: Continue",
},
{
"<F10>",
function()
require("dap").step_over()
end,
desc = "Debug: Step over",
},
{
"<F11>",
function()
require("dap").step_into()
end,
desc = "Debug: Step into",
},
{
"<F12>",
function()
require("dap").step_out()
end,
desc = "Debug: Step out",
},
{
"<F9>",
function()
require("dap").toggle_breakpoint()
end,
desc = "Debug: Toggle breakpoint",
},
},
}