init
This commit is contained in:
33
nvim/lua/plugins/extras/dap/core-extended.lua
Normal file
33
nvim/lua/plugins/extras/dap/core-extended.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
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" },
|
||||
{ "<F2>", function() require("dap").toggle_breakpoint() end, desc = "Debug: Toggle breakpoint" },
|
||||
{ "<S-F2>", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
optional = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>tL", function() require("neotest").run.run_last({ strategy = "dap" }) end, desc = "Debug Last Test" },
|
||||
},
|
||||
},
|
||||
}
|
||||
35
nvim/lua/plugins/extras/dap/persistent-breakpoints.lua
Normal file
35
nvim/lua/plugins/extras/dap/persistent-breakpoints.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local prefix = "<leader>db"
|
||||
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
optional = true,
|
||||
vscode = false,
|
||||
dependencies = {
|
||||
"Weissle/persistent-breakpoints.nvim",
|
||||
vscode = false,
|
||||
event = "LazyFile",
|
||||
keys = {
|
||||
{ prefix .. "d", "<cmd>PBClearAllBreakpoints<cr>", desc = "Delete All Breakpoints" },
|
||||
{ prefix .. "B", "<cmd>PBSetConditionalBreakpoint<cr>", desc = "Breakpoint Condition" },
|
||||
{ prefix .. "b", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
|
||||
{ "<F2>", "<cmd>PBToggleBreakpoint<cr>", desc = "Toggle Breakpoint" },
|
||||
},
|
||||
opts = {
|
||||
load_breakpoints_event = { "BufReadPost" },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<F2>", false },
|
||||
{ "<leader>dB", false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "breakpoints", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
12
nvim/lua/plugins/extras/dap/repl-highlights.lua
Normal file
12
nvim/lua/plugins/extras/dap/repl-highlights.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"LiadOz/nvim-dap-repl-highlights",
|
||||
opts = {},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "dap_repl" })
|
||||
end
|
||||
end,
|
||||
}
|
||||
17
nvim/lua/plugins/extras/dap/telescope.lua
Normal file
17
nvim/lua/plugins/extras/dap/telescope.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-dap.nvim",
|
||||
cond = LazyVim.has("nvim-dap"),
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").load_extension("dap")
|
||||
end)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>dm", "<cmd>Telescope dap commands<CR>", desc = "Commands" },
|
||||
{ "<leader>df", "<cmd>Telescope dap frames<CR>", desc = "Frames" },
|
||||
{ "<leader>dG", "<cmd>Telescope dap configurations<CR>", desc = "Configurations" },
|
||||
{ "<leader>dbL", "<cmd>Telescope dap list_breakpoints<CR>", desc = "List Breakpoints" },
|
||||
{ "<leader>dv", "<cmd>Telescope dap variables<CR>", desc = "Variables" },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user