dotfiles/.config/nvim/lua/plugins/dap.lua

54 lines
1.6 KiB
Lua
Raw Normal View History

2023-03-01 15:04:05 +01:00
return {
2022-12-27 18:36:38 +01:00
"mfussenegger/nvim-dap",
dependencies = {
{
"theHamsta/nvim-dap-virtual-text",
config = function()
require("nvim-dap-virtual-text").setup({
commented = true,
})
end,
},
{
"leoluz/nvim-dap-go",
config = function()
require("dap-go").setup()
end,
},
},
2023-03-01 15:04:05 +01:00
keys = {
{ "DD", ":lua require'dap'.toggle_breakpoint()<cr>", desc = "Toggle Breakpoint" },
{ "Dc", ":lua require'dap'.continue()<cr>", desc = "Continue" },
{ "Di", ":lua require'dap'.step_into()<cr>", desc = "Step Into" },
{ "Do", ":lua require'dap'.step_over()<cr>", desc = "Step Over" },
{ "DO", ":lua require'dap'.step_out()<cr>", desc = "Step Out" },
{ "Dh", ":lua require'dap.ui.widgets'.hover()<cr>", desc = "Hover" },
{ "Dr", ":lua require'dap'.repl.toggle({height = 5})<cr>", desc = "Toogle Repl" },
},
config = function()
require("dap")
require("dap.ext.vscode").load_launchjs()
2022-12-27 18:36:38 +01:00
2023-03-01 15:04:05 +01:00
vim.fn.sign_define(
"DapBreakpoint",
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
"DapBreakpointCondition",
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
"DapBreakpointRejected",
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
)
vim.fn.sign_define(
"DapLogPoint",
{ text = "", texthl = "DapLogPoint", linehl = "DapLogPoint", numhl = "DapLogPoint" }
)
vim.fn.sign_define(
"DapStopped",
{ text = "", texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" }
)
end,
}