debug
This commit is contained in:
parent
71404b98aa
commit
33383e5fbf
@ -39,6 +39,9 @@ map("n", "<S-tab>", "<Cmd>BufferPrevious<CR>", { desc = "Previous tab" })
|
||||
|
||||
-- dap
|
||||
map("n", "<leader>bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
|
||||
map("n", "<F5>", dap.step_into, { desc = "Step into" })
|
||||
map("n", "<F6>", dap.step_over, { desc = "Step over" })
|
||||
map("n", "<F8>", dap.continue, { desc = "Continue" })
|
||||
|
||||
-- nvterm
|
||||
map("n", "<leader>t", function()
|
||||
|
@ -1,16 +1,62 @@
|
||||
local gitsigns = require("gitsigns")
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
return {
|
||||
{
|
||||
name = " Toggle breakpoint",
|
||||
cmd = dap.toggle_breakpoint,
|
||||
rtext = "<leader>bb",
|
||||
},
|
||||
name = " Debug",
|
||||
hl = "Exblue",
|
||||
items = {
|
||||
{
|
||||
name = " Toggle breakpoint",
|
||||
cmd = dap.toggle_breakpoint,
|
||||
rtxt = "<leader>bb",
|
||||
},
|
||||
|
||||
{
|
||||
name = " Run debug",
|
||||
cmd = dap.continue,
|
||||
{
|
||||
name = " Run debug",
|
||||
cmd = dap.continue,
|
||||
},
|
||||
|
||||
{
|
||||
name = " Eval",
|
||||
cmd = dapui.eval,
|
||||
},
|
||||
|
||||
{
|
||||
name = " Stack",
|
||||
cmd = function()
|
||||
require("dapui").float_element("stacks")
|
||||
end,
|
||||
},
|
||||
|
||||
{ name = "separator" },
|
||||
|
||||
{
|
||||
name = " Step into",
|
||||
cmd = dap.step_into,
|
||||
rtxt = "<F5>",
|
||||
},
|
||||
|
||||
{
|
||||
name = " Step over",
|
||||
cmd = dap.step_over,
|
||||
rtxt = "<F6>",
|
||||
},
|
||||
|
||||
{
|
||||
name = " Continue",
|
||||
cmd = dap.continue,
|
||||
rtxt = "<F8>",
|
||||
},
|
||||
|
||||
{ name = "separator" },
|
||||
|
||||
{
|
||||
name = " Toggle UI",
|
||||
cmd = require("dapui").toggle,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ name = "separator" },
|
||||
|
@ -10,18 +10,18 @@ return {
|
||||
config = function()
|
||||
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
|
||||
-- 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
|
||||
|
||||
fn.sign_define("DapBreakpoint", { text = "", texthl = "red", linehl = "", numhl = "" })
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user